Complete the code to create a basic index on the column 'last_name'.
CREATE INDEX idx_last_name ON employees([1]);The index should be created on the 'last_name' column as specified.
Complete the code to create an index on 'last_name' and include 'first_name' as an included column.
CREATE INDEX idx_last_name_include ON employees(last_name) INCLUDE ([1]);The INCLUDE clause adds 'first_name' as a non-key column to the index for covering queries.
Fix the error in the index creation by completing the INCLUDE clause with the correct column.
CREATE INDEX idx_salary_include ON employees(salary) INCLUDE ([1]);The INCLUDE clause should have a column different from the indexed key column. 'employee_id' is a good choice to cover queries.
Fill both blanks to create an index on 'department' and include 'salary' and 'hire_date' columns.
CREATE INDEX idx_dept_include ON employees([1]) INCLUDE ([2]);
The index is on 'department' and includes both 'salary' and 'hire_date' columns to cover queries.
Fill all three blanks to create an index on 'last_name' and include 'first_name' and 'email' columns.
CREATE INDEX idx_full_include ON employees([1]) INCLUDE ([2], [3]);
The index is on 'last_name' and includes 'first_name' and 'email' to cover queries efficiently.