Eine Einführung in
SQL
String contains a quote '
SQLite
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to SQLite
none
DB2
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to DB2
none
MS Access
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to MS Access
none
PostgreSQL
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to PostgreSQL
none
Oracle
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to Oracle
none
MS SQL Server
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to MS SQL Server
none
MySQL
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to MySQL
none
Sybase
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to Sybase
none
Mimer SQL
If the data contains a single quote it must be escaped.
Execute tidy up
code
silently
DELETE FROM t_q
Execute set up
code
DROP TABLE t_q; CREATE TABLE t_q (a VARCHAR(8));
INSERT INTO t_q VALUES ('O''Brian'); SELECT * FROM t_q
Specific to Mimer SQL
none