sql - How to use the exists operator properly in mysql? -
I want the EXISTS operator to list client names that do not have an order
So, I have two tables (as shown below), a designated customer who holds the customer name and customer ID and the other designated orders that hold the customer ID as well as the order ID. I
Customer ID using Customer,
Select Customer ID, Order Order from Order Where Order ID & lt; & Gt; Customer ID);
But the way I wanted it is not working.
In a way you can do that EXISTS syntax privately, it makes more sense to me I think this query will work for you:
Choose customer name, Customer ID to customer C, where no one is from (order from where order from C.CustomerId = O.CustomerId)
Comments
Post a Comment