Is there an Oracle equivalent of the show show mysql command?

I know you can use:

SELECT DISTINCT(table_name) 
  FROM all_tab_cols

Would there be a better way in Oracle to show a table i.e. the MySQL show table; team.

+5
source share
5 answers

If you need a complete structure, you can use

SELECT dbms_metadata.get_ddl( 'TABLE', 'MY_TABLE_NAME' ) FROM DUAL;

see more reference syntax

+8
source

Try it describe table <table-name>in SQL * Plus. It does all the fetching and beautiful formatting. Works with tables, but also procedures, triggers, constraints, etc. (Just use different keywords).

+4
source

select * from user_tables;

. :

select table_name from user_tables;
+1
describe <table-name>

SQL * Plus

+1

Of course, it depends on your use. Do you need information in the program or do you want to look at the structure of the table yourself? Many tools will give you an idea of ​​the structure of the table, including: PLSQL-developer, Toad for Oracle, SQLDeveloper. If you want to use the table structure in the query, it is better to resort to the views of the Oracle data dictionary (user _..., all _..., dba _...)

0
source

All Articles