原文链接:
http://bbs.youkuaiyun.com/topics/70045444
字符串中的',一律用两个''表示就行了
create table test(
id integer primary key autoincrement,
var text
);
insert into
test(id,var)
values(null, 'he''s brother --"The Dragon"');
本文介绍了在SQL中如何正确处理包含特殊字符如单引号的字符串,通过使用双引号来确保数据库能够正确解析这些字符串,以避免语法错误。
字符串中的',一律用两个''表示就行了
create table test(
id integer primary key autoincrement,
var text
);
insert into
test(id,var)
values(null, 'he''s brother --"The Dragon"');
5555

被折叠的 条评论
为什么被折叠?