Administering Microsoft SQL Server 2012/2014 Databases — Question 17
Which of the following statements will create an index called "SalesDate" on the DATEOFSALE column on the SALES table residing in the WAREHOUSE database?
Answer options
- A. CREATE INDEX SalesDate ON SALES (DATEOFSALE);
- B. MAKE INDEX SalesDate ON SALES (DATEOFSALE);
- C. CREATE INDEX ON SALES (DATEOFSALE);
- D. CREATE INDEX SalesDate ON SALES +DATEOFSALE; A
Correct answer:
Explanation
The correct answer is A, as it follows the proper SQL syntax for creating an index. Option B uses 'MAKE' which is not a valid SQL command for creating indexes, while options C and D are incomplete or incorrectly formatted for the task.