Show us how scott create the index on his emp table.
-----
set long 4000
set pagesize 0
select dbms_metadata.get_dependent_ddl('INDEX', 'EMP', 'SCOTT')
from dual;
-----
Example3)
Show us how tablespace data is created:
-----
set long 4000
set pagesize 0
select dbms_metadata.get_ddl('TABLESPACE', TABLESPACE_NAME)
from dba_tablespaces
where tablespace_name = 'DATA';
-----
CREATE TABLESPACE "DATA" DATAFILE
'/oracle/920/oradata/db920/data_1.dbf' SIZE 10485760 REUSE
AUTOEXTEND ON NEXT 4096 MAXSIZE UNLIMITED
LOGGING ONLINE PERMANENT BLOCKSIZE 4096
EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT MANUAL
Now you can start to learn what is means, modify it and use it in your own work.作者: sshd 时间: 2005-01-01 04:21 标题: oracle for the lazy people (1) Exampe 1) and 2)
connect scott/tiger
Example 3)
connect / as sysdba
if you remove the "where" clause you get the DDLs for all tablespaces in the system.