PLEASE USE MICROSOFT SQL SERVER MANAGEMENT STUDIO 18
The purpose of this task is to create a student table such that it has 2 partitions. One that will include all student id's through 500 and a second one that will include all student id's above 500.
StudentID int
StudentName varchar(30)
*StudentID should be a a primary key.
**StudentName should be required.
Do you not use the master filegroup.
Each partition should be associated with a different physical file. Use any names you want for the objects involved.
PLEASE INCLUDE SCREENSHOT OF ALL RESULTS
DO NOT SEND ME THIS CODE AGAIN IT DOES NOT WORK ON STUDIO 18 it has errors in it
CREATE TABLE Student (
StudentID int PRIMARY KEY,
StudentName varchar(30) NOT NULL
DATA DIRECTORY = '/external/directory'
)
PARTITION BY RANGE(StudentID)
( PARTITION part_less_than_501 VALUES LESS THAN (501),
PARTITION part_greater_than_500 VALUES LESS THAN MAXVALUE
);
Answer 2:
INSERT INTO Student VALUES (1, "Stud 1"), (500, "Stud 500"), (501,
"Stud 501"), (999, "Stud 999");
Answer 3:
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='Student';
Answer 2:
INSERT INTO Student VALUES (1, "Stud 1"), (500, "Stud 500"), (501,
"Stud 501"), (999, "Stud 999");
Answer 3:
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='Student';
Get Answers For Free
Most questions answered within 1 hours.