The two tables used by the trigger are shown below
--Create SC table CREATETABLE[SC] ([Scid]intnotnull,[sno]intnotnull,[cno]intnotnull,[score]intdefaultnull,primarykey ([ScId ])
);
--Add Resume Createtablescore_record (
Sridintnotnull,
Snointnotnull,
Cnointnotnull,
Oldscoreintnotnull,
Newscoreintnotnull,
Updatetimedatetimenotnull,primarykey (SrId),
);
The following is a MySQL-written trigger
--mysql write triggers-create triggers, insert the results before and after the change into the resume droptriggerifexists ' TRIGGER_SR ';
Delimiter//createtrigger ' trigger_sr ' Afterupdateon ' SC ' FOREACH rowbegininsertintoscore_recordsetsno=new. SNo,
Cno=new. CNo,
Oldscore=old. Score,
Newscore=new. Score,
Updatetime=now (); End//delimiter;
The following are the triggers written by SQL Server
--sqlserver write triggers--create triggers, insert the results before and after the changes into the resume createtriggertrigger_sronscforupdateasdeclare@
This is just the difference between triggers, such as stored procedures, custom functions and so there must be a big difference, but now the feeling is to learn a database language, and other databases to learn the same.