Which of the following MySQL query will display all the NAME from the table STUDENT, which are having maximum five characters and starting with the alphabet…
Which of the following MySQL query will display all the NAME from the table STUDENT, which are having maximum five characters and starting with the alphabet 'A'?
Show answerHide answer
Correct answer: (A) SELECT NAME FROM STUDENT WHERE NAME LIKE 'A____';
Explanation
LIKE with the wildcard _ matches exactly one character, so 'A____' matches names that start with A and have five characters. The = operator does not treat wildcards specially.