How to search for a specified pattern with the LIKE operator in a WHERE clause in SQL

4 Answers

0 votes
--   selects all workers that the their first name start with the letter "d"

SELECT * FROM Workers
WHERE FirstName LIKE 'd%'

 



answered Sep 17, 2015 by avibootz
0 votes
--   selects all workers that the their first name end with the letter "f"

SELECT * FROM Workers
WHERE FirstName LIKE '%f'

 



answered Sep 17, 2015 by avibootz
0 votes
--   selects all workers that the their first name contain "ie"

SELECT * FROM Workers
WHERE FirstName LIKE '%ie%'

 



answered Sep 17, 2015 by avibootz
0 votes
--   selects all workers that the their first name NOT contain "ie"
 
SELECT * FROM Workers
WHERE FirstName NOT LIKE '%ie%'

 



answered Sep 17, 2015 by avibootz

Related questions

12 answers 1,191 views
1 answer 353 views
353 views asked Oct 6, 2015 by avibootz
3 answers 430 views
430 views asked Sep 18, 2015 by avibootz
1 answer 292 views
292 views asked Sep 18, 2015 by avibootz
3 answers 353 views
353 views asked Sep 18, 2015 by avibootz
1 answer 396 views
...