programming-examples/sql/Subqueries/21. Write a query to display the salesmen which name are alphabetically lower than the name of the customers.sql
2019-11-18 14:05:53 +01:00

7 lines
235 B
SQL

/*21. Write a query to display the salesmen which name are alphabetically lower than the name of the customers.*/
SELECT *
FROM salesman a
WHERE EXISTS
(SELECT *
FROM CUSTOMER b
WHERE a.name < b.cust_name);