Reputation: 861
A table in Oracle Database 11g contains the sequences and triggers if we are to use auto-increment fields.
I'm using the Oracle SQL Developer and couldn't find a solid way to create a consolidated table creation script.
Is it possible to create a consolidated DDL script with the below artefacts for a given table :
Upvotes: 0
Views: 497
Reputation: 142720
It is the DBMS_METADATA
built-in package we use for such a purpose and its GET_DDL
function.
More info in documentation.
Quite a few examples on Oracle-base site (scroll down, to the bottom of the page).
For a single table (which is what you asked), you'd run e.g.
select dbms_metadata.get_ddl('TABLE', 'EMP', 'SCOTT') from dual;
Upvotes: 1