String contains a quote '

From SQLZOO
Revision as of 11:16, 17 July 2012 by Marek (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

String contains a quote '

schema:scott

If the data contains a single quote it must be escaped.

DELETE FROM t_q
DROP TABLE t_q;
CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian');
SELECT * FROM t_q
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense