Complete the code to create an index on the 'email' column of the 'users' table.
CREATE INDEX [1] ON users(email);The index name 'users_email_idx' follows a common naming convention for indexes on the 'users' table and 'email' column.
Complete the code to insert a new user into the 'users' table.
INSERT INTO users (id, name, email) VALUES ([1], 'Alice', 'alice@example.com');
The 'id' column is usually an integer, so the value should be 1 without quotes.
Fix the error in the UPDATE statement to change the email of user with id 1.
UPDATE users SET email = [1] WHERE id = 1;
String values in SQL must be enclosed in single quotes.
Fill both blanks to create a unique index on the 'username' column of the 'accounts' table.
CREATE [1] INDEX [2] ON accounts(username);
The keyword UNIQUE creates a unique index. The name 'unique_username_idx' clearly describes the index.
Fill all three blanks to update the 'last_login' column to current timestamp for user with id 5.
UPDATE [1] SET [2] = [3] WHERE id = 5;
The table is 'users', the column to update is 'last_login', and the value is the SQL function CURRENT_TIMESTAMP.