Skip to content
Advertisement

How to join tables without using join SQL

I’m trying to write a SQL query to grab information from multiple tables and output an end result: a list of all clients that have not placed a stock request yet. Displaying client number will be sufficient.

I am not allowed to use inner join or any type of join to achieve this.

So far this is what I have come up with.

This current attempt doesn’t return the desired result.

Here is the information from the tables:

Any help would be appreciated.

Advertisement

Answer

You can achieve it through this code:

You don’t need to indicate the stock_request table on your main SELECT, you just need to use the stock_request table to fetch all the clientNum in a subquery by using IN, I think your using IN the wrong way.

Check more about MySQL IN Operator.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement