触发器 create tirgger insert_tab on tablename for insert delect * from inserted where 字段 like'%script%' or 字段 like'%js%'
alter table table WITH NOCHECK add constraint test check (charindex('js',字段)=0 ) alter table table WITH NOCHECK add constraint test1 check (charindex('js',字段)=0 )
上面错了 alter table table WITH NOCHECK add constraint test check (charindex('script',字段)=0 ) alter table table WITH NOCHECK add constraint test1 check (charindex('js',字段)=0 )
alter table table WITH NOCHECK add constraint test check (charindex('js',字段)=0 and charindex('script',字段)=0 )
create tirgger insert_tab
on tablename
for insert
delect * from inserted where 字段 like'%script%' or 字段 like'%js%'
add constraint test check (charindex('js',字段)=0 )
alter table table WITH NOCHECK
add constraint test1 check (charindex('js',字段)=0 )
alter table table WITH NOCHECK
add constraint test check (charindex('script',字段)=0 )
alter table table WITH NOCHECK
add constraint test1 check (charindex('js',字段)=0 )
add constraint test check (charindex('js',字段)=0 and charindex('script',字段)=0 )