CREATETRIGGERtrigger_1ontable_1FORINSERTAS
BEGIN
IFEXITS(SELECT*FROMinsertedWHEREUser_nameUser_name())
BEGIN
ROLLBACKTRANSACTION
RAISERROR(请输出准确的用户名,16,-1)
END
END
CREATETRIGGERtrigger_2ontable_1FORUPDATE,DELETEAS
BEGIN
IFEXITS(SELECT*FROMdeletedWHEREUser_nameUser_name())
BEGIN
RAISERROR(你不克不及修正别人的数据,16,-1)
END
END