I just want an update trigger like this postgresql version... It seems to me there is no NEW. and OLD. in MSSQL?
CREATE OR REPLACE FUNCTION "public"."ts_create" () RETURNS trigger AS
DECLARE
BEGIN
NEW.ctime := now();
RETURN NEW;
END;
Googled already, but nothing to be found unfortunately... Ideas?
Update: Sth, like this?
CREATE TRIGGER tr01 ON Auctions for insert
As
update auctions set mtime = GETDATE() where Id = inserted.Id;
or this:
CREATE TRIGGER tr01 ON Auctions for insert
As
inserted.ctime := GETDATE();
bothg dont work of course ;)