Home » Other » Training & Certification » ORACLE QUESTION
ORACLE QUESTION [message #135366] Wed, 31 August 2005 05:21 Go to next message
sethybibeka
Messages: 10
Registered: August 2005
Location: bhubanes
Junior Member
How To show a DDL the SATEMENT after creating the table
Re: ORACLE QUESTION [message #135427 is a reply to message #135366] Wed, 31 August 2005 09:26 Go to previous message
Mahesh Rajendran
Messages: 10690
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
scott@9i > @ddl.ddl
  CREATE TABLE "SCOTT"."DEPT"
   (    "DEPTNO" NUMBER(2,0),
        "DNAME" VARCHAR2(14),
        "LOC" VARCHAR2(13)
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"
 ;


  CREATE TABLE "SCOTT"."EMP"
   (    "EMPNO" NUMBER,
        "ENAME" VARCHAR2(10),
        "JOB" VARCHAR2(9),
        "MGR" NUMBER(4,0),
        "HIREDATE" DATE,
        "SAL" NUMBER(7,2),
        "COMM" NUMBER(7,2),
        "DEPTNO" NUMBER(2,0),
         CONSTRAINT "PK1" PRIMARY KEY ("EMPNO")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"
 ;


  CREATE TABLE "SCOTT"."SOMETABLE"
   (    "ID" VARCHAR2(30)
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"
 ;

scott@9i > get ddl.ddl
  1  set long 500000
  2  set linesize 1000
  3  set feed off;
  4  SET HEAD off
  5  --exec dbms_metadata.set_transform_param(dbms_metadata.session_transform,'STORAGE',false);
  6  SELECT DBMS_METADATA.GET_DDL('TABLE',TABLE_NAME)||';' FROM user_tables ;
  7* set head on;

Previous Topic: Oracle training in Mumbai
Next Topic: OCA help
Goto Forum:
  


Current Time: Tue Mar 31 11:46:49 CDT 2020