Which of the following will display information about all the employees from…
2023
Which of the following will display information about all the employees from employee table, whose names contains second letter as "A"?
- A.
SELECT * FROM EMPLOYEE WHERE NAME LIKE "_A%"; / SELECT FROM EMPLOYEE WHERE NAME LIKE "_A%";
- B.
SELECT FROM EMPLOYEE WHERE NAME LIKE "%A_"; / SELECT FROM EMPLOYEE WHERE NAME LIKE "%A_";
- C.
SELECT * FROM EMPLOYEE WHERE NAME LIKE '%A%';
- D.
SELECT FROM EMPLOYEE WHERE NAME ="_A%" / SELECT FROM EMPLOYEE WHERE NAME ="_A%"
Attempted by 1776 students.
Show answer & explanation
Correct answer: A
Correct Answer: Option 1 Explanation: To select employees whose second letter of NAME is 'A' , we use the pattern: _A% Here, _ matches exactly one character, A is the second character, and % matches the rest. So the correct query is: SELECT * FROM EMPLOYEE WHERE NAME LIKE "_A%"; Hindi Explanation: