Progress
SQL-89
Guide and Reference
Creating a Schema
Progress/ESQL provides access to all DDL statements available in Progress/SQL. In addition, Progress/ESQL provides the CREATE SCHEMA statement that allows you to create an entire schema in a single statement. The CREATE SCHEMA statement lets you combine a set of table and view definitions and grant privileges on them.
The substatement options allow you to create tables and views, and grant table and column privileges in a connected database. The value db-user must be the logical name of the database. The substatement options can refer to tables and views created by earlier substatement options specified in the same CREATE SCHEMA statement.
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 db-user corresponds to a different logical database.
In the following example, the application creates a customer table in a schema with the user name joe, and attempts to access the table with the following SELECT statement fragment.
To resolve any ambiguity between the customer table in the joe schema and a table by the same name in other schemas, ESQL/C interprets the SELECT statement fragment, as follows.
The CREATE SCHEMA statement is supported in ESQL only. For more information on the CREATE SCHEMA statement, see "Progress/SQL-89 Reference" and the Progress Embedded SQL-89 Guide and Reference .
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |