字符串中含有符号"'",造成语法错误,如何解决呢,如下句,
select count(0) from abasiccode where strf= 'U.S.A.DAKKAR'S 8080 '

解决方案 »

  1.   

    把'换成''
    select count(0) from abasiccode where strf= 'U.S.A.DAKKAR''S 8080 '
      

  2.   

    select count(0) from abasiccode where strf= 'U.S.A.DAKKAR''S 8080 '
      

  3.   

    再加一个'
    select count(0) from abasiccode where strf= 'U.S.A.DAKKAR''S 8080 '
      

  4.   

    在SQL Server 中两个''为一个'select count(0) from abasiccode where strf= 'U.S.A.DAKKAR''S 8080 '
      

  5.   


    select count(0) from abasiccode where strf= 'U.S.A.DAKKAR''S 8080 '
      

  6.   


    select count(0) from abasiccode where strf= 'U.S.A.DAKKAR''S 8080 '
    一个 ‘ 默认为 从 DAKKAR 后面就截断了