Examine this statement, which executes successfully:
Now examine this query:
Which two statements can do this? (Choose two.)
ALTER TABLE employees -
ADD INDEX (birth_date DESC);
ADD INDEX ((MONTH(birth_date)));
ADD COLUMN birth_month tinyint unsigned GENERATED ALWAYS AS (MONTH(birth_date)) VIRTUAL NOT NULL,
ADD INDEX (birth_month);
ADD COLUMN birth_month tinyint unsigned GENERATED ALWAYS AS (birth_date->>'$.month') VIRTUAL NOT NULL,
ADD INDEX ((CAST(birth_date->>'$.month' AS unsigned)));
ADD INDEX (birth_date);
Submit