Complete the code to create an index on the column 'username' in the 'users' table.
CREATE INDEX idx_username ON users([1]);The index should be created on the 'username' column to speed up queries filtering by username.
Complete the query to find users with the email 'example@example.com' using the index.
SELECT * FROM users WHERE [1] = 'example@example.com';
The query filters by the 'email' column, so the index on 'email' would speed this up.
Fix the error in the index creation statement by completing the blank.
CREATE INDEX idx_created [1] users (created_at);The correct syntax is CREATE INDEX index_name ON table_name (column); 'ON' is required before the table name.
Fill both blanks to create a unique index on the 'email' column in the 'customers' table.
CREATE [1] INDEX idx_email_unique [2] customers (email);
To create a unique index, use 'UNIQUE' before 'INDEX' and 'ON' before the table name.
Fill the blanks to drop an index named 'idx_username' from the 'users' table.
DROP [1] IF EXISTS [2];
The correct command to drop an index is DROP INDEX IF EXISTS index_name;