Which statement should you run?

You work as a Database Administrator (DBA) at ABC.com. All databases are hosted on Windows
Server 2012 servers running SQL Server 2012.
You create a table using the following statement:

CREATE TABLE Orders
(
OrderID int NOT NULL PRIMARY KEY,
CustomerID int NOT NULL,
OrderDate date NOT NULL
);
You intended the table to be created in a schema named Sales. However the table was created in
a schema named Purchasing.
You want to move the Orders table from the Purchasing schema to the Sales schema.
Which statement should you run?

You work as a Database Administrator (DBA) at ABC.com. All databases are hosted on Windows
Server 2012 servers running SQL Server 2012.
You create a table using the following statement:

CREATE TABLE Orders
(
OrderID int NOT NULL PRIMARY KEY,
CustomerID int NOT NULL,
OrderDate date NOT NULL
);
You intended the table to be created in a schema named Sales. However the table was created in
a schema named Purchasing.
You want to move the Orders table from the Purchasing schema to the Sales schema.
Which statement should you run?

A.
ALTER TABLE Purchasing.Orders TRANSFER Sales.Orders

B.
ALTER TABLE Sales.Orders TRANSFER Purchasing.Orders

C.
ALTER SCHEMA Purchasing TRANSFER Sales.Orders

D.
ALTER SCHEMA Sales TRANSFER Purchasing.Orders

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *