DBMS Interview Questions and Answers
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:
- What is database or database management systems (DBMS)?
- What is SQL?
- What's the difference between file and database? Can files qualify as a database?
- What’s difference between DBMS and RDBMS?
- How many types of relationship exist in database designing?