Quick Search:
 
 The Oracle CLOSE Statement      [Return To Index] Jump to:  

Term: CLOSE

Definition:
The Oracle CLOSE statement is used in two ways:

  • To close a cursor once you are done using it
  • To drop or close a database link when it is no longer needed

Closing a cursor
The last step of working with a cursor is to close the cursor when you are done with it. The basic syntax to CLOSE a cursor is:

CLOSE cursor_name;


For example, if you are using a cursor with the name "cursor_x", you would close it using this command:

CLOSE cursor_x;



Closing a database link
Database links should be closed when no longer in use. To close a link, issue the following statement, where link_name refers to the name of the link:

ALTER SESSION CLOSE DATABASE LINK <link_name>;


Note that this statement only closes the links that are active in your current session.


Related Links:

Related Code Snippets:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org