Examine this statement, which executes successfully: Now examine this query: You must add an index that can reduce the number of rows processed by the query. Which two statements can do this? (Choose two.)
A.
ALTER TABLE employees - ADD INDEX (birth_date DESC);
B.
ALTER TABLE employees - ADD INDEX ((MONTH(birth_date)));
C.
ALTER TABLE employees - ADD COLUMN birth_month tinyint unsigned GENERATED ALWAYS AS (MONTH(birth_date)) VIRTUAL NOT NULL, ADD INDEX (birth_month);
D.
ALTER TABLE employees - ADD COLUMN birth_month tinyint unsigned GENERATED ALWAYS AS (birth_date->>'$.month') VIRTUAL NOT NULL, ADD INDEX (birth_month);
E.
ALTER TABLE employees - ADD INDEX ((CAST(birth_date->>'$.month' AS unsigned)));
F.
ALTER TABLE employees - ADD INDEX (birth_date);
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
marklv
5 months, 3 weeks ago