EasyManua.ls Logo

Sybase Adaptive Server Anywhere - CREATE SCHEMA Statement

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CREATE SCHEMA statement
462
CREATE SCHEMA statement
Use this statement to create a collection of tables, views, and permissions for
a database user.
CREATE SCHEMA AUTHORIZATION
userid
… [
create-table-statement
|
create-view-statement
|
grant-statement
], …
Must have RESOURCE authority.
Automatic commit.
"CREATE TABLE statement" on page 466
"CREATE VIEW statement" on page 482
"GRANT statement" on page 540
The CREATE SCHEMA statement creates a schema. A schema is a
collection of tables, views, and their associated permissions.
The userid must be the user ID of the current connection. You cannot create
a schema for another user.
If any statement contained in the CREATE SCHEMA statement fails, the
entire CREATE SCHEMA statement is rolled back.
The CREATE SCHEMA statement is simply a way of collecting together
individual CREATE and GRANT statements into one operation. There is no
SCHEMA database object created in the database, and to drop the objects
you must use individual DROP TABLE or DROP VIEW statements. To
revoke permissions, you must use a REVOKE statement for each permission
granted.
The individual CREATE or GRANT statements are not separated by
statement delimiters. The statement delimiter marks the end of the CREATE
SCHEMA statement itself.
The individual CREATE or GRANT statements must be ordered such that
the objects are created before permissions are granted on them.
Although you can currently create more than one schema for a user, this is
not recommended, and may not be supported in future releases.
SQL/92 Entry level feature.
Sybase Adaptive Server Anywhere does not support the use of
REVOKE statements within the CREATE SCHEMA statement, and
does not allow its use within Transact-SQL batches or procedures.
Function
Syntax
Permissions
Side effects
See also
Description
Standards and
compatibility

Table of Contents

Related product manuals