GENERATE_DDL_FOR_SCHEMA

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > Basic Building Blocks > Functions > Built-in Functions > General Management Functions >

GENERATE_DDL_FOR_SCHEMA

Previous pageReturn to chapter overviewNext page

Returns the create statement for every item in a named schema.

Syntax

SYS_BOOT.MGMT.GENERATE_DDL_FOR_SCHEMA(<catalogname>,<schema_name>);

 

where catalogname (optional) is the name of the catalog and schema_name (mandatory) is the name of the schema.

5_2_indicator

Version 5.2 Feature

As of version 5.2, you no longer need to use the preface SYS_BOOT.MGMT.

Example

SELECT STATEMENT FROM TABLE(SYS_BOOT.MGMT.GENERATE_DDL_FOR_SCHEMA('LOCALDB','SALES'));

'STATEMENT'

'CREATE OR REPLACE SCHEMA SALES;'

''

'CREATE OR REPLACE FUNCTION SALES.MAYBE_FEMALE('

'  GENDER CHAR(1))'

'RETURNS BOOLEAN'

'SPECIFIC SALES.MAYBE_FEMALE'

'LANGUAGE SQL'

'CONTAINS SQL'

'NOT DETERMINISTIC'

'RETURN NOT (("GENDER" = 'F') IS FALSE);'

''

'CREATE TABLE SALES.AGGT0 ('

'   N INTEGER NOT NULL,'

'   PRIMARY KEY (N)'

');'