Complete the code to create an index named idx_name on the column col1 of the table my_table.
CREATE INDEX [1] ON my_table (col1);The index name follows the CREATE INDEX keyword. Here, idx_name is the correct index name.
Complete the code to create a unique index named unique_idx on the column email of the table users.
CREATE [1] INDEX unique_idx ON users (email);The keyword UNIQUE creates an index that enforces uniqueness on the column values.
Fix the error in the code to create an index named idx_age on the age column of the table persons.
CREATE INDEX idx_age [1] persons (age);The correct syntax uses the keyword ON before the table name.
Fill both blanks to create a unique index named idx_unique on the columns col1 and col2 of the table data_table.
CREATE [1] INDEX idx_unique [2] data_table (col1, col2);
The first blank needs UNIQUE to make the index unique. The second blank needs ON to specify the table.
Fill all three blanks to create a fulltext index named idx_fulltext on the column description of the table products.
CREATE [1] INDEX [2] [3] products (description);
The first blank is the index type FULLTEXT. The second blank is the index name idx_fulltext. The third blank is the keyword ON before the table name.