Which code fragment should you use?

You are a database developer. You plan to design a database solution by using SQL Server 2008.
A database contains a table that has a column definedas a smallint data type. The table is partitioned on the basis of the smallint column. The partition function, named MyRangePF1, is a range-right function that has boundaries of 100 and 1,000.
The table must be altered to contain the following partitions:
< 100
>= 100 and < 400
>= 400 and < 700
>= 700 and < 1000
>= 1000
You need to alter the partition function to provide the required partitions.
Which code fragment should you use?

You are a database developer. You plan to design a database solution by using SQL Server 2008.
A database contains a table that has a column definedas a smallint data type. The table is partitioned on the basis of the smallint column. The partition function, named MyRangePF1, is a range-right function that has boundaries of 100 and 1,000.
The table must be altered to contain the following partitions:
< 100
>= 100 and < 400
>= 400 and < 700
>= 700 and < 1000
>= 1000
You need to alter the partition function to provide the required partitions.
Which code fragment should you use?

A.
ALTER PARTITION FUNCTION MyRangePF1 ()SPLIT RANGE (399); GO
ALTER PARTITION FUNC TION MyRangePF1 () SPLIT RANGE (699); GO

B.
ALTER PARTITION FUNCTION MyRangePF1 ()SPLIT RANGE (400); GO
ALTER PARTITION FUNC TION MyRangePF1 () SPLIT RANGE (700); GO

C.
DROP PARTITION FUNCTION myRangePF1; GO
CREATE PARTITION FUNCTION myRangePF1 (s mallint)
AS RANGE RIGHT FOR VALUES (99, 399, 699, 999);

D.
DROP PARTITION FUNCTION myRangePF1; GO
CREATE PARTITION FUNCTION myRangePF1 (s mallint)
AS RANGE LEFT FOR VALUES (100, 400, 700,1000);

Explanation:
/ 19



Leave a Reply 0

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