Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to script a Table or View in SQL Plus

Status
Not open for further replies.

Fampofo

Programmer
May 24, 2002
16
GB
Hello Guys
Is it possible to script the sql statement of a view or a table from sql plus command line ?
I am working on an ODBC via Access and I need to see the sql statement of this view. Help will be much appreciated.
thanks
frank
 
View text:


select text from user_views where view_name=<view name>


For 9i and above you may use DBMS_METADATA.GET_DDL procedure.

Regards, Dima
 
if the code of the view is a little bit long, by the moment TEXT is a LONG type field, you have to issue a command like:
SET LONG 2000
prior to run SQL the SQL command posted by sem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top