-
How to get the script for a Oracle Table
Hi,
My requirement is to write a SQL which would give me the full script about a table. ( The full syntax when we create a table ).It should also include the constraints,indexes and privileges.
I am giving an example.
CREATE TABLE ABC
(
ID NUMBER(12,2) NOT NULL,
USED_DATE DATE NOT NULL,
MSISDN NUMBER NOT NULL DEFAULT 0,
CONSTRAINT PK_ABC
PRIMARY KEY ( ID, USED_DATE)
USING INDEX
TABLESPACE IND
)
CREATE INDEX X1_VOU_POD ON ABC(MSISDN)
TABLESPACE IND
-
-
USE THE FOLLOWING SCRIPT
SELECT DBMS_METADATA.GET_DDL('TABLE','TEST','USER1') FROM DUAL;
Regards,
Surajit K Mitra
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
|