建议不要用"varchar类型的字段"
还是用NVarchar()

解决方案 »

  1.   

    create table tx(v varchar(100) check (v not like '%script%'))
      

  2.   

    前台的页的包括后台我都加了旁注,过滤了以下字符串"1=1|1=2|2=1|2=2|exec|select|delete|update|truncate|declare|CREATE|<script"但是问题依然,不知道这样加旁注行不行,应该怎样做,会不是服务器上直接被挂了马了呢,怎么如何检测呢。
      

  3.   

    create rule R_test
     as 
       not patindex('%script%',@col)>0
    sp_bindrule 'R_test', 'tb.colname'