Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle CLOSE Statement      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

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      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 72 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?