Question - How can you perform pattern matching in SQL?
Answer -
You can perform pattern matching in SQL by using the LIKE operator. With the LIKE operator, you can use the following symbols:
%(Percentage sign) – To match zero or more characters.
_ (Underscore) –To match exactly one character.
Example:
SELECT * FROM Customers WHERE CustomerName LIKE ‘s%’
SELECT * FROM Customers WHERE CustomerName like ‘xyz_’