insert 触发器

CREATE TRIGGER TRI_TEST

ON TB_STUDENT

FOR INSERT

AS

DECLARE @NAME VARCHAR(20)

SELECT @NAME=i.sname FROM inserted i

IF @NAME='\0x09'

BEGIN

   raiserror('有特殊字符',16,8)

   ROLLBACK tran

END




你可能感兴趣的:(触发器,insert)