Complete the code to create an index on the column 'email' in the 'users' table.
CREATE INDEX [1] ON users (email);The index name can be any valid identifier. Here, idx_email is a common naming style for indexes.
Complete the code to drop the index named 'idx_email' from the 'users' table.
DROP INDEX [1] ON users;The DROP INDEX statement requires the exact index name. Here, it is idx_email.
Fix the error in the code to add a unique index on the 'username' column in the 'accounts' table.
CREATE [1] INDEX idx_username ON accounts (username);To enforce uniqueness, use UNIQUE before INDEX. Other options are for different purposes.
Fill both blanks to create a composite index on 'last_name' and 'first_name' columns in the 'employees' table.
CREATE [1] INDEX [2] ON employees (last_name, first_name);
The statement creates a normal index named idx_fullname on two columns.
Fill all three blanks to create a fulltext index named 'idx_content' on the 'title' and 'body' columns in the 'articles' table.
CREATE [1] INDEX [2] ON articles ([3]);
This creates a fulltext index named idx_content on the columns title and body.