statement
PREPARE
Creates a session-local prepared statement. PostgreSQL uses positional placeholders such as $1; the server may choose custom or generic plans. Example target: PostgreSQL 17. Use only the isolated starter dataset; setup and expected results are in the batch evidence.
Formal Syntax & Structure
sql syntaxsql
PREPARE name(type) AS statementWorking Example
Example Snippetsql
PREPARE lab_lookup(integer) AS SELECT name FROM customers WHERE id=$1;