Which of the following query displays all the employees details whose lnames are having % character any where?
select * from employees where lname like '%[%]%'
select * from employees where lname like '%^%%' escape '^'
Both first and second options are valid .
None of the given options are correct .
While searching for the existence of a character in a string , if the character is % or underscore, then we have to place these characters in the square brackets or use escape clause as shown in the second option.
Back To Top