Answer the question
In order to leave comments, you need to log in
Is it possible to get Oracle database schema using sql query?
Good night everybody.
I ask you to tell the Oracle experts whether it is possible to obtain a database schema with commands for creating tables by means of a sql query to the Oracle database.
For example, using sqldeveloper or sqlplus.
Answer the question
In order to leave comments, you need to log in
Oracle has a DBMS_METADATA package that allows you to pull out information about tables in the form that the exp or datapump utility saves them.
You can also use the built-in features of any advanced Oracle administration/development program: TOAD, PL/SQL Developer, etc.
Well, the last option is to export/import schemas with ROWS=0 (no data). Not exactly SQL, but might come in handy.
SELECT *
FROM all_tab_columns
or so
select * from v$database - info about the database to which it is connected
select * from v$instance - info about the oracle instance
select * from dba_objects where object_type='TABLE' - info about tables
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question