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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -