在SQL Server
触发器中每个语句都有效,而不是逐行.使用:
CREATE TRIGGER [dbo].[Group_Update] ON [dbo].[TBL_ADM_USER_GROUP] AFTER UPDATE AS BEGIN SET NOCOUNT ON; INSERT INTO TBL_TestTable -- define column list for clarity SELECT CONCAT('Group "' ,i.name,'" is updated'), 'GROUP', 'Update', SYSDATETIME(), i.changer_user_id FROM inserted i; END