Oracle Database 19c Related Various SQL Codes, Database 19c , SQL Codes, jaberitltd, jaberit, oracle apex, racle Drop User, get ddl for
How To Use DBMS_METADATA To Get DDL For Objects And Drop All Tables, Packages, Functions
How To Use DBMS_METADATA To Get DDL For Objects How To Use DBMS_METADATA To Get DDL For Objects The DBMS_METADATA package is a powerful tool for obtaining a complete definition of a schema object. It enables you to get all the qualities of an object in one pass. The object is described as DDL which can be used to create (re).
The GET_DDL function is used to fetch DDL for all tables in the current schema, filtering nested tables and overflow segments. SET_TRANSFORM_PARAM (DBMS_METADATA.SESSION_TRANSFORM equals handle value which means "for current session") is used to specify that storage clauses will not be returned to SQL DDL.
Next, the session-level transform parameters are reset to their defaults. Once set, the transform parameter values remain valid until they are specifically reset to the default. Get DDL for all tables:- SELECT DBMS_METADATA.GET_DDL ('TABLE', table_name)
FROM USER_TABLES; Get DDL for all Index-
SELECT DBMS_METADATA.GET_DDL('INDEX',…