Complete the code to define a column named 'status' with ENUM type having values 'active' and 'inactive'.
CREATE TABLE users (id INT, status ENUM([1]));The ENUM type requires listing the allowed string values inside parentheses and quotes, separated by commas. Here, 'active' and 'inactive' are the correct values for the 'status' column.
Complete the code to define a SET column named 'features' that can include 'wifi', 'parking', and 'pool'.
CREATE TABLE hotels (id INT, features SET([1]));The SET type allows multiple values from the list. Here, the column 'features' can include 'wifi', 'parking', and 'pool'.
Fix the error in the ENUM definition for a column 'priority' with values 'low', 'medium', 'high'.
CREATE TABLE tasks (id INT, priority ENUM([1]));ENUM values must be quoted strings. Option D correctly quotes all values.
Fill both blanks to create a table with a SET column 'options' allowing 'red', 'green', and 'blue', and a default value of 'red'.
CREATE TABLE colors (id INT, options SET([1]) DEFAULT [2]);
The SET column must list all allowed values, and the default must be one of those values quoted.
Fill all three blanks to define a table with an ENUM column 'level' with values 'beginner', 'intermediate', 'advanced', a SET column 'skills' with 'sql', 'python', 'java', and default 'beginner' for 'level'.
CREATE TABLE learners (id INT, level ENUM([1]) DEFAULT [2], skills SET([3]));
The ENUM 'level' must list all levels, default to 'beginner', and the SET 'skills' must list all allowed skills.