Difference between revisions of "SQL CLOSE"

From Lianjapedia
Jump to: navigation, search
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Closes a cursor  
 
Closes a cursor  
 
  
 
==Syntax==
 
==Syntax==
 
CLOSE <cursor>
 
CLOSE <cursor>
 
  
 
==See Also==
 
==See Also==
 
[[DECLARE CURSOR]], [[DROP CURSOR]], [[FETCH]], [[OPEN]], [[SQL SELECT|SELECT]]
 
[[DECLARE CURSOR]], [[DROP CURSOR]], [[FETCH]], [[OPEN]], [[SQL SELECT|SELECT]]
 
  
 
==Description==
 
==Description==
 
The CLOSE command closes the specified cursor, releasing all resources and locks allocated when the cursor was opened.  A cursor is a pointer to a logical table.  A logical table is a temporary collection of data that satisfy conditions specified in a SELECT statement.  After a cursor has been CLOSED, it may be accessed again by issuing another OPEN statement.  The cursor is not released until a DROP CURSOR statement is issued.  This command can only be used in Embedded SQL.  The cursor must already be open.
 
The CLOSE command closes the specified cursor, releasing all resources and locks allocated when the cursor was opened.  A cursor is a pointer to a logical table.  A logical table is a temporary collection of data that satisfy conditions specified in a SELECT statement.  After a cursor has been CLOSED, it may be accessed again by issuing another OPEN statement.  The cursor is not released until a DROP CURSOR statement is issued.  This command can only be used in Embedded SQL.  The cursor must already be open.
  
 
+
{| class="wikitable" width="100%"
{| class="wikitable"
+
 
!Keywords||Description
 
!Keywords||Description
 
|-
 
|-
Line 21: Line 17:
 
|-
 
|-
 
|}
 
|}
 
  
 
==Example==
 
==Example==
Line 27: Line 22:
 
CLOSE accounts
 
CLOSE accounts
 
</code>
 
</code>
 
+
 
+
==Products==
+
Recital Server, Recital
+
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SQL|CLOSE]]
 
[[Category:SQL|CLOSE]]
 
[[Category:Commands]]
 
[[Category:Commands]]

Latest revision as of 11:07, 30 January 2013

Purpose

Closes a cursor

Syntax

CLOSE <cursor>

See Also

DECLARE CURSOR, DROP CURSOR, FETCH, OPEN, SELECT

Description

The CLOSE command closes the specified cursor, releasing all resources and locks allocated when the cursor was opened. A cursor is a pointer to a logical table. A logical table is a temporary collection of data that satisfy conditions specified in a SELECT statement. After a cursor has been CLOSED, it may be accessed again by issuing another OPEN statement. The cursor is not released until a DROP CURSOR statement is issued. This command can only be used in Embedded SQL. The cursor must already be open.

Keywords Description
cursor The name of the cursor to be closed.

Example

CLOSE accounts