Thread: New to Triggers
View Single Post

   
  #6 (permalink)  
Old 02-28-2008, 07:44 PM
Anith Sen
 
Posts: n/a
Default Re: New to Triggers

Dave,

Actually I was suggesting you, NOT to use a trigger at all, instead use the
DEFAULT keyword in your INSERT & UPDATE statements directly. So when you do
your UDPATE, you simply do:

UPDATE tbl
SET ....
ModBy = DEFAULT,
ModDate = DEFAULT
WHERE ...;

If you have a WHERE clause it will limit the number of rows based on the
WHERE clause condition & the DEFAULT will be effective for those rows only.
If you do not use a WHERE clause, all rows are updated & the DEFAULT is
applicable for all the rows in the table. Is that making sense?

--
-- Anith
( Please reply to newsgroups only )


Reply With Quote