Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

DBMS%20Interview%20Questions%20and%20Answers

Question: What is Like operator for and what are wild cards in DMBS?
Answer:
LIKE operator is used to match patterns. A "%" sign is used to define the pattern.
Below SQL statement will return all words with letter "S"
SELECT * FROM pcdsEmployee WHERE EmpName LIKE 'S%'
Below SQL statement will return all words which end with letter "S"
SELECT * FROM pcdsEmployee WHERE EmpName LIKE '%S'
Below SQL statement will return all words having letter "S" in between
SELECT * FROM pcdsEmployee WHERE EmpName LIKE '%S%'
"_" operator (we can read as “Underscore Operator”). “_” operator is the character defined at that point. In the below sample fired a query Select name from pcdsEmployee where name like
'_s%' So all name where second letter is “s” is returned.
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook