According to the doc:
""
surrounded by ""
are evaluated to "
so """"
are evaluated to ""
and """"""
are evaluated to """
(even numbers) but "
, """
and """""
(odd numbers) do not work. *""
can be used to surround identifiers like table and column names, SELECT
, WHERE
, etc and []
and ``
can be also used to surround identifiers.
''
surrounded by ''
are evaluated to '
so ''''
are evaluated to ''
and ''''''
are evaluated to '''
(even numbers) but '
, '''
and '''''
(odd numbers) do not work. *''
can be used to surround string literals like values.
*Don't use ""
to surround string literals because there is error according to my experiments.
*Don't use ''
to surround identifiers because sometimes do not work properly according to my experiments.
For example, you can create my"table
with my"column
as shown below:
CREATE TABLE "my""table" (
"my""column" TEXT
);
Or:
CREATE TABLE [my"table] (
[my"column] TEXT
);
Or:
CREATE TABLE `my"table` (
`my"column` TEXT
);
Then, you can insert a row with my"value
for my"column
to my"table
as shown below:
INSERT INTO "my""table" ("my""column") VALUES ('my"value');
Or:
INSERT INTO [my"table] ([my"column]) VALUES ('my"value');
Or:
INSERT INTO `my"table` (`my"column`) VALUES ('my"value');
Finally, you can get the row as shown below:
SELECT * FROM "my""table";
Or:
SELECT * FROM [my"table];
Or:
SELECT * FROM `my"table`;
And, you can create my'table
with my'column
as shown below:
CREATE TABLE "my'table" (
"my'column" TEXT
);
Or:
CREATE TABLE [my'table] (
[my'column] TEXT
);
Or:
CREATE TABLE `my'table` (
`my'column` TEXT
);
Then, you can insert a row with my'value
for my'column
to my'table
as shown below:
INSERT INTO "my'table" ("my'column") VALUES ('my''value');
Or:
INSERT INTO [my'table] ([my'column]) VALUES ('my''value');
Or:
INSERT INTO `my'table` (`my'column`) VALUES ('my''value');
Finally, you can get the row as shown below:
SELECT * FROM "my'table";
Or:
SELECT * FROM [my'table];
Or:
SELECT * FROM `my'table`;
INSERT INTO table_name (field1, field2) VALUES (?, ?)
and the values would be supplied directly (and without substitutions). – Golem