CREATE SCHEMA statement - Creation of several tables, views & grants in one operation - Oracle Schema

Q.  What can be included in the CREATE SCHEMA statement which is useful if you want to guarantee the creation of several tables, views, and grants in one operation?

- Published on 12 Aug 15

a. CREATE TABLE
b. CREATE VIEW
c. GRANT
d. All mentioned above

ANSWER: All mentioned above
 

    Discussion

  • Nirja Shah   -Posted on 25 Sep 15
    - You can create several tables and views and grant privileges in one operation using the CREATE SCHEMA statement.

    - The CREATE SCHEMA statement is useful if you want to guarantee the creation of several tables, views, and grants in one operation.

    - If an individual table, view or grant fails, the entire statement is rolled back.

    - None of the objects are created, nor are the privileges granted.

    - Specifically, the CREATE SCHEMA statement can include only CREATE TABLE, CREATE VIEW, and GRANT statements.

    - You must have the privileges necessary to issue the included statements.

    - You are not actually creating a schema, that is done when the user is created with a CREATE USER statement.

    - Rather, you are populating the schema.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)