SQL: Filter records using in operator
SQL Wildcard & Special Operator : Exercise-2 with Solution
Write a query to filter those salesmen with all information who comes from any of the cities Paris and Rome.
Sample table: salesman
SELECT * FROM salesman WHERE city IN('Paris','Rome');
Output of the Query:
salesman_id name city commission 5002 Nail Knite Paris 0.13 5006 Mc Lyon Paris 0.14 5007 Paul Adam Rome 0.13
Pictorial presentation :
Contribute your code and comments through Disqus.
Previous: Write a SQL statement to find those salesmen with all information who come from the city either Paris or Rome.
Next: Write a query to produce a list of salesman_id, name, city and commision of each salesman who live in cities other than Paris and Rome.
What is the difficulty level of this exercise?