My Oracle Support Banner

How to use Back Slash '\' In Dbms_metadata.get_ddl Package (Doc ID 2395320.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

Goal

While using the dbms_metadata.get_ddl function to extract the creation DDL for an object,
like to get the commands splitted by '\' (slash) and not by ';' (semi-colon) using the following commands:

begin
dbms_metadata.set_transform_param ( dbms_metadata.SESSION_TRANSFORM, 'SQLTERMINATOR', true );
dbms_output.put_line(dbms_metadata.get_ddl ( 'TABLE','TANLE_NAME','SCHEMA_NAME'));
end;
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.