Re: New to Triggers First, thanks for your reply. Second, if I'm correct, the default
value only applies to new records should no value be pleased in that
field. Also, what differentiates one record from the whole table? I
need to only update the User and Date for the record that's been
updated.
"Anith Sen" <anith@bizdatasolutions.com> wrote in message news:<FNhqb.11590$9M3.2537@newsread2.news.atl.eart hlink.net>...
> If you already have defaults, there is no need for triggers. You can use the
> DEFAULT keyword in your INSERT & UPDATE DMLs like:
>
> INSERT tbl (..., Modby, ModDate) VALUES (..., DEFAULT, DEFAULT);
>
> UPDATE tbl
> SET ....
> ModBy = DEFAULT,
> ModDate = DEFAULT
> WHERE ...; |