开发者

Insert a String Value with Semicolon Causes Error

开发者 https://www.devze.com 2023-03-09 04:15 出处:网络
How can I escape a 开发者_Python百科semicolon in a string for insert into an SQL database table?

How can I escape a 开发者_Python百科semicolon in a string for insert into an SQL database table?

Example:

Insert Into items(Description)
Values('Anti Surge T; LBC Slow Blow 6.3 x 32mm 7A / 250V');


semicolon in a string should not cause any problem, still enclose the string in single quotes in insert statement.

0

精彩评论

暂无评论...
验证码 换一张
取 消