How Does Oracle query the complete definition statement of an object?

Source: Internet
Author: User

How Does Oracle query the complete definition statement Syntax of an object: www.2cto.com DBMS_METADATA.GET_DDL (object_type IN VARCHAR2, name IN VARCHAR2, schema IN VARCHAR2 default null, version IN VARCHAR2 DEFAULT 'compute ', model IN VARCHAR2 DEFAULT 'oracle ', transform IN VARCHAR2 DEFAULT 'ddler') return clob; example: select dbms_metadata.get_ddl ('table', 'emp', 'Scott') from dual; www.2cto.com [SQL] SQL> select dbms_metadata.get_ddl ('table', 'emp', 'Scott ') from dual; DBMS_METADATA.GET_DDL ('table', 'emp', 'Scott ') -------------------------------------------------------------------------------- create table "SCOTT ". "EMP" ("EMPNO" NUMBER (4,0), "ENAME" VARCHAR2 (10 ), -- after LONG and pagesize are SET, SQL is fully displayed.> set long 2000000 SQL> set pagesize 0 SQL> select dbms_metadata.get_ddl ('table', 'emp', 'Scott ') from dual; create table "SCOTT ". "EMP" ("EMPNO" NUMBER (4, 0), "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 "PK_EMP" primary key ("EMPNO ") using index pctfree 10 limit 2 MAXTRANS 255 compute statistics storage (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 freelist groups 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT limit DEFAULT) TABLESPACE "USERS" ENABLE, CONSTRAINT "FK_DEPTNO" foreign key ("DEPTNO") REFERENCES "SCOTT ". "DEPT" ("DEPTNO") ENABLE) segment creation immediate pctfree 10 PCTUSED 40 limit 1 MAXTRANS 255 nocompress logging storage (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 freelist groups 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT limit DEFAULT) TABLESPACE "USERS"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.