string literal
A fixed text value written directly in a query between single quotes, such as 'Lagos'.
In more detail
Standard SQL uses single quotes for text and double quotes for names of tables and columns. Values that come from users should never be pasted into the query text; pass them as bound parameters instead.
Example
WHERE country = 'NG'Related terms
- TEXT — The column type for character strings such as names, cities and, in SQLite, dates written as text.
- prepared statement — A SQL statement with placeholders, such as ?, whose values are sent separately from the SQL text instead of pasted into it.
- SQL injection — An attack where untrusted input is joined into a database query so that part of it runs as SQL, letting an attacker read or change data.
Taught in
- Filtering With The WHERE Clause — PostgreSQL, Indexing & Relational Data Modeling