programming-examples/sql/QueryMultipleTables/Write a query to find those customers with their name and those salesmen with their name and city who lives in the same city.sql

6 lines
258 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*Write a query to find those customers with their name and those salesmen with their name and city
who lives in the same city.*/
SELECT customer.cust_name,
salesman.name, salesman.city
FROM salesman, customer
WHERE salesman.city = customer.city;