Skip to content
Rene Saarsoo edited this page Apr 18, 2025 · 11 revisions

Parameter placeholder markers used in prepared statements.

Note: Apache Hive, SingleStoreDB, Snowflake and Spark don't support prepared statements.

Positional parameters

These come in the form of single question mark (?), supported by:

Numbered parameters

Named parameters

  • BigQuery: @ followed by identifier (either quoted or unquoted)
  • DB2: colon (:) followed by name (the name can include letters, numbers, and the symbols @, #, $, and _)
  • DB2i: colon (:) followed by name.
  • DuckDB: $ followed by quoted- or unquoted identifier (can't contain further $ characters).3
  • N1QL: $ followed by unquoted identifier
  • PL/SQL: colon (:) followed by identifier. (The linked documentation says only alphanumeric chars are allowed, but issue 822 says that $ and # characters are also supported like in normal identifiers.)
  • SQLite: $, @ or : followed by unquoted identifier
  • Transact-SQL: @ or :4 followed by identifier (either quoted or unquoted)

Notes:

  1. When using ODBC or OLE DB driver
  2. When SQL_MODE=ORACLE enabled.
  3. Tested in https://shell.duckdb.org/
  4. When using Oracle driver.
Clone this wiki locally