insert into table1 (field1) values(replace(文本内容,''','''')) where ...

解决方案 »

  1.   

    '在SQL中输入属于非法操作,但是在现实中又确实有这样的情况存在,因此在以往的编程中都是对这一块的操作在程序中处理转换。很希望能够看到该符号能够直接通过SQL语句的操作保存到数据库中。期待着...
      

  2.   

    把你的变量里的'变成''就行了。VB:
    field1 = replace( field1, "'", "''" )C#:
    field1 = field1.Replace( "'", "''" ) ;
      

  3.   

    insert into table1 (field1) values('worker'' time') where ...
      

  4.   

    insert into table1 (field1) values('worker'' time') where ...
      

  5.   

    sql字符串中2个'代表一个'