问题:postgreSQL insert 字段包含单引号,如:insert into table values('1001','tom'cat'),执行报错;

解决:将单引号替换为两个单引号,如 detail = detail.replace("'","''"),变为:insert into table values('1001','tom''cat')
参考:http://www.itpub.net/thread-780335-1-1.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2021-08-11
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案