DBMS_METADATA Browsing Interface
The DBMS_METADATA browsing interface is for casual use within SQL clients such
as SQL*Plus. It is provided by the GET_xxx, GET_DEPENDENT_xxx, and GET_
GRANTED_xxx functions.
n The GET_DDL and GET_XML functions return metadata for a single named
object. For example, the following query will show the DDL for all tables in the
current user’s schema:
SQL> SELECT dbms_metadata.get_ddl(’TABLE’, table_name) FROM user_tables;
tstuser@SD> SELECT dbms_metadata.get_ddl('TABLE', 'A') FROM dual;
DBMS_METADATA.GET_DDL('TABLE','A')
--------------------------------------------------------------------------------
CREATE TABLE "TSTUSER"."A"
( "ID" NUMBER(10,0),
"NAME" VARCHAR2(20)
) 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 "USERS2"
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8102208/viewspace-594822/ ,如需转载,请注明出处,否则将追究法律责任。