Quoting a value can help inspect how SQLite represents it as a literal. Application queries should still pass user values as bound parameters.
Worked example
SELECT quote('O''Brien') AS literal;Result
[
{
"literal": "'O''Brien'"
}
]Implementation notes
SQL quoting conventions are for SQL literals. A value printed for diagnostics still needs separate escaping if it will appear inside HTML or another output format.
Try it yourself
Inspect a value containing an apostrophe and one containing NULL.
Open the SQL example →Editorial date May 6, 2026 · Published December 6, 2026