docs
docs copied to clipboard
SQL Statements Doc Update : PREPARE / EXECUTE / DEALLOCATE
Re: SQL Statements
Issue Description
There is no documentation on the following statements:
PREPAREEXECUTEDEALLOCATE
Per internal discussion, these statements are supported.
Related PostgreSQL doc is https://www.postgresql.org/docs/current/sql-prepare.html
Suggested Resolution
Document the PREPARE, EXECUTE, and DEALLOCATE statements.
Here is an example of using these statements, using the cockroach demo command:
[email protected]:26257/movr> select count(*) from users where city='seattle';
count
---------
6
(1 row)
Time: 2ms total (execution 2ms / network 0ms)
[email protected]:26257/movr> prepare q1 (string) as select count(*) from users where city=$1;
PREPARE
Time: 1ms total (execution 1ms / network 0ms)
[email protected]:26257/movr> execute q1 ('seattle');
count
---------
6
(1 row)
Time: 2ms total (execution 2ms / network 0ms)
[email protected]:26257/movr> deallocate q1;
DEALLOCATE
Time: 1ms total (execution 0ms / network 0ms)