天天看點

第二章 SQL參考指令-CLOSE

CLOSE

Closes acursor.

概要

CLOSE cursor name

描述

CLOSE釋放和一個遊标關聯的資源。遊标關閉後,沒有後續操作是允許就可以了。當不再需要它的遊标應該關閉。

當一個事務由COMMIT或ROLLBACK終止每個不可保持打開遊标被隐式關閉。如果建立事務通過它中止ROLLBACK一個保持遊标被隐式關閉。如果建立事務成功送出,直到執行一個明确的CLOSE的保持的遊标保持打開,或者用戶端斷開。

parameter

cursor_name     Thename of an open cursor to close.

Notes

Greenplum Database does not have anexplicit open cursorstatement. A cursor is considered open when it is declared. Use the declare statement to declare (and open) acursor.

You can seeall available cursors by querying the pg_cursors system view.

示例

Close thecursor portaia:Q

CLOSE portala;

相容性

close is fully conforming with the SQLstandard.

相關參考

DECLARE,FETCH, MOVE

繼續閱讀