cockroachdb / cockroachdb/docs

SQL Statements Doc Update : PREPARE / EXECUTE / DEALLOCATE

オープン
#13,682 コメント 0 件 リアクション 0 件 担当者 1 名 @rmloveland が担当を希望しています GitHub で見る
C-doc-improvement
主要言語
HTML
スター
212
フォーク
476
平均マージ
40分
マージ済み PR(30日)
3

説明

Re: [SQL Statements](https://cockroachlabs.com/docs/v21.2/sql-statements.html)

## Issue Description

There is no documentation on the following statements:

* `PREPARE`
* `EXECUTE`
* `DEALLOCATE`

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:

```
demo@127.0.0.1:26257/movr> select count(*) from users where city='seattle';
count
---------
6
(1 row)

Time: 2ms total (execution 2ms / network 0ms)

demo@127.0.0.1:26257/movr> prepare q1 (string) as select count(*) from users where city=$1;
PREPARE

Time: 1ms total (execution 1ms / network 0ms)

demo@127.0.0.1:26257/movr> execute q1 ('seattle');
count
---------
6
(1 row)

Time: 2ms total (execution 2ms / network 0ms)

demo@127.0.0.1:26257/movr> deallocate q1;
DEALLOCATE

Time: 1ms total (execution 0ms / network 0ms)
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。