Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A couple of questions
songmuh wrote in message <01bd2d9f$be791c20$b24337a6_at_g2k486>...
>2. I want to get the table definition and format it to a text file so that
I can import the file into a structure.
Try the following SQL-Script:
set linesize 1000
set pagesize 0
set feedback off
spool 'myfile.txt'
select table_name, column_name, data_type, data_length, data_precision,
data_scale, nullable from user_tab_columns order by table_name, column_name;
spool off
Replace user_tab_columns by all_tab_columns to get the table definitions of
all users. In this dictionary view
you have an extra column 'owner'.
Hth,
Rainer
Received on Tue Feb 03 1998 - 00:00:00 CST