Which Transact-SQL should you use to create the SalesHistory table as a partitioned table?

You are a database developer on an instance of SQL Server 2008. You have over a million rows of sales history data that you plan to import into theSales database. You want to create a SalesHistory table to store the data.
Sales history for each branch is identified by the BranchID column, which is an int data type, and most queries will be executed by branch managers for their specific branch’s data. You decide to partition the table to improve query performance.
You want to partition the SalesHistory table as follows:


Which Transact-SQL should you use to create the SalesHistory table as a partitioned table?
A. CREATE PARTITION FUNCTION MyPF (int)
AS RANGE LEFT FOR VALUES (6999, 26999, 56999, 86999);
CREATE PARTITION SCHEME MyPSAS PARTITION MyPFTO (fg1, fg2, fg3, fg4, fg5);
CREATE TABLE SalesHistory (OrderID int,OrderDate datetime,TerritoryID int,BranchID int,TaxFlg bit,ShipMethodID int,Amount money)ON MyPS(BranchID);
B. CREATE PARTITION FUNCTION MyPF (int)
AS RANGE LEFT FOR VALUES (7000, 27000, 57000, 87000);
CREATE TABLE SalesHistory (OrderID int,OrderDate datetime,TerritoryID int,BranchID int,TaxFlg bit,ShipMethodID int,Amount money)ON MyPF(BranchID);
C. CREATE PARTITION FUNCTION MyPF (int)
AS RANGE LEFT FOR VALUES (7000, 27000, 57000, 87000);
CREATE PARTITION SCHEME MyPSAS PARTITION MyPFTO (fg1, fg2, fg3, fg4, fg5);
CREATE TABLE SalesHistory (OrderID int,OrderDate datetime,TerritoryID int,BranchID int,TaxFlg bit,ShipMethodID int,Amount money)ON MyPS(BranchID);
D. CREATE PARTITION FUNCTION MyPF (int)
AS RANGE LEFT FOR VALUES (7000, 27000, 57000, 87000);
CREATE PARTITION SCHEME MyPSAS PARTITION MyPFTO (fg1, fg2, fg3, fg4, fg5);
CREATE TABLE SalesHistory (OrderID int,OrderDate datetime,TerritoryID int,BranchID int,TaxFlg bit,ShipMethodID int,Amount money)ON MyPS(OrderDate);

microsoft-exams

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.