programming-examples/sql/Subqueries/15. Write a query to extract the data from the customer table if and only if one or more of the customers in the customer table are located in London.sql

8 lines
293 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*15. Write a query to extract the data from the customer table if and only if one or more of the customers in the customer
table are located in London.*/
SELECT customer_id,cust_name, city
FROM customer
WHERE EXISTS
(SELECT *
FROM customer
WHERE city='London');