need the code to do this on sql2000 should be simple.
here is the table:
comment_id integer primary key,
user_id not null references users,
ip_address varchar(50) not null,
modified_date date not null,
content varchar (255)
I need a really sumer basic trigger where if any of these
filed are inserted or updated it should update the modified_date filed to current timestamp now();
found a good example how to do this but it was written in
PL/SQL. I need something that would work on updates or inserts of all fields written in T-SQL for SQL 2000 db.
any ideas?
create trigger general_comments_modified
before insert or update on content
for each row
begin
:new.modified_date := sysdate;
end;
here is the table:
comment_id integer primary key,
user_id not null references users,
ip_address varchar(50) not null,
modified_date date not null,
content varchar (255)
I need a really sumer basic trigger where if any of these
filed are inserted or updated it should update the modified_date filed to current timestamp now();
found a good example how to do this but it was written in
PL/SQL. I need something that would work on updates or inserts of all fields written in T-SQL for SQL 2000 db.
any ideas?
create trigger general_comments_modified
before insert or update on content
for each row
begin
:new.modified_date := sysdate;
end;