Lawrence D'Oliveiro
2024-07-15 22:46:15 UTC
In standard SQL, backslashes have no special significance. String literals
are delimited by single quotes, and any characters (except single quotes)
are allowed in them; to include a single quote in the string, write it
twice.
So in Python, this expression is sufficient to turn a string “s” into a
standard SQL string literal:
"'" + s.replace("'", "''") + "'"
are delimited by single quotes, and any characters (except single quotes)
are allowed in them; to include a single quote in the string, write it
twice.
So in Python, this expression is sufficient to turn a string “s” into a
standard SQL string literal:
"'" + s.replace("'", "''") + "'"