16.5k views
5 votes
Which statement creates a new database schema named Sales and establishes Sharon as the owner?

a) CREATE SCHEMA Sales AUTHORIZATION Sharon;
b) CREATE DATABASE Sales OWNER Sharon;
c) CREATE SCHEMA Sales OWNER Sharon;
d) CREATE DATABASE Sales AUTHORIZATION Sharon;

1 Answer

5 votes

Final answer:

The correct SQL statement to create a new database schema named 'Sales' with 'Sharon' as the owner is 'CREATE SCHEMA Sales AUTHORIZATION Sharon;'. It specifies that 'Sharon' has authorization rights over the schema.

Step-by-step explanation:

To create a new database schema named Sales and establish Sharon as the owner, the correct SQL statement would be: CREATE SCHEMA Sales AUTHORIZATION Sharon; This statement accomplishes two things: first, it creates a new schema within a database called Sales, and second, it gives Sharon authorization rights as the owner of this newly created schema.

It's important to note that CREATE DATABASE is a separate command used for creating an entire database, not just a schema within a database. Therefore, options b) and d) are incorrect in the context of creating a schema. Option c) uses the syntax OWNER which is incorrect for creating a schema with an owner in SQL; the correct syntax uses AUTHORIZATION.

User AshleyS
by
8.3k points