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,750 views
1 answer 475 views
475 views asked Oct 6, 2015 by avibootz
3 answers 595 views
595 views asked Sep 18, 2015 by avibootz
1 answer 392 views
392 views asked Sep 18, 2015 by avibootz
3 answers 525 views
525 views asked Sep 18, 2015 by avibootz
1 answer 513 views
...