Progress/ESQL DDL Statements

Progress/ESQL provides access to all DDL statements available in Progress/SQL. In addition, Progress/ESQL provides the CREATE SCHEMA statement which creates an entire schema in a single statement. The CREATE SCHEMA statement has the following syntax:

SYNTAX
EXEC SQL CREATE SCHEMA AUTHORIZATION db-user {CREATE-TABLE-statement | 
CREATE-VIEW-statement } ... ; GRANT-statement 

The options allow you to create tables AND views, and grant table and column privileges in a connected database with the logical name that db-user specifies. The options can refer to tables and views that earlier options of the same CREATE SCHEMA statement create. For more information on the options, see the Progress SQL-89 Guide and Reference .

This statement uses the logical database name (db-user) as a user ID and password to allow your application to create multiple schemas, possibly with the same table and view names, associated with different users. To distinguish the schemas in Progress, each user corresponds to a different logical database.

For example, suppose that your application creates a customer table in a schema with the user name jon and attempts to access the table with the following SELECT statement fragment:

... SELECT * FROM customer ... 

To resolve any ambiguity between the customer table in the jon schema and a table with the same name in other schemas, ESQL interprets the fragment as follows.

... SELECT * FROM jon.customer ... 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095