SQL
zoo.net
String contains a quote '
SQLite
DB2
Access
Postgres
Oracle
SQL Server
MySQL
Mimer
Sybase
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 SQL Server
none
Related links:
INSERT, UPDATE and DELETE
INSERT is used to add records.
UPDATE can change an existing record.
DELETE removes records.
'INSERT..SELECT' copies data from a SELECT into a table.
INSERT: Not all fields need be specified. Default values may be specified in the CREATE TABLE clause - otherwise NULL is used.
Insert a date.
Explicitly enter a NULL.
Can't INSERT because of reference.
Cannot DELETE because of reference.
Can't insert data because of incompatable formats.
String contains a quote '
to select the data from 20 different columns into one changing the values according to one other column consisting the positions of the 20 columns