-
output sqlplus command
Hi. I am trying to describe a table and include the command on output.
(ie. DESC ECR.TABLE1 I would like to include the command on the output so I can have the tablename on the output..
What setting do I need to turn on ? I tried various sqlplus settings, but nothing seems to do what I want. Please help thanks.
-
The table name is included?
Code:
SQL> spool e:\test.log
SQL> desc t1
Name Null? Type
----------------------------------------- -------- -----------------------
STR VARCHAR2(2000)
SQL> spool off
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Pr
With the Partitioning, Oracle Label Security, OLAP and Data Mining options
E:\>type test.log
SQL> desc t1
Name Null? Type
----------------------------------------- -------- -----------------------
STR VARCHAR2(2000)
SQL> spool off
E:\>
-
Hi. Your example works for 1 table.
I have created a 'tables.sql' script which has 150 desc statements(the entire schema). The output displays the structure of all the tables and does not include the table name. I have not found a way to do this ? Anybody know how ?
-
Put the following at the top of your script:
-
Its funny, but I tried that in SQLPLUS in OEM and it does not work.
However, it does work in SQLPLUS command line.
Thanks.
-
Try some variation on:
SET LINES 150
SET PAGES 100
BREAK ON table_name
SELECT table_name, column_name, data_type, data_length
FROM all_tab_columns
WHERE owner = ''
ORDER BY 1
and play with formatting the output as appropriate.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|