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,202 views
1 answer 358 views
358 views asked Oct 6, 2015 by avibootz
3 answers 432 views
432 views asked Sep 18, 2015 by avibootz
1 answer 297 views
297 views asked Sep 18, 2015 by avibootz
3 answers 355 views
355 views asked Sep 18, 2015 by avibootz
1 answer 403 views
...