很多时候,在数据库中某表某字符字段中,要存储的数据内容会含有单引号,比如下面:

string name = GetNameById(id);
string sql = string.Format("update cover_diagnose set name = '{0}' where id = 48951",name);

相关文章:

  • 2022-12-23
  • 2022-02-28
  • 2021-07-28
  • 2021-07-31
  • 2022-12-23
  • 2021-12-31
  • 2021-12-31
  • 2022-12-23
猜你喜欢
  • 2021-08-20
  • 2022-12-23
  • 2021-12-27
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案