Inner our left join?

Hi all.
I need your help, this is my tables in db mysql:

do_tableA

ID	NAME 
1	KEVIN
2	LAURA
3	CINDY
4	ROBERT

do_tableB

ID	NAME 
1	HUMPREY
2	KEVIN
3	LAURA
4	MARGOT
5	CINDY
6	LAUREN
7	ROBERT
8	FREDDIE

I need this output:

1	HUMPREY
4	MARGOT
6	LAUREN
8	FREDDIE

Any help would be very much appreciated and many thanks to any who can help me.

Thanks in advance.
Chevy

Really thanks for your suggestion.
You understand my problem:


SELECT * FROM do_tableB AS o
LEFT JOIN do_tableA AS c ON c.NAME = o.NAME
WHERE c.NAME IS NULL 
ORDER BY ID ASC

For r937:
Learn to use the names do_tableA and do_tableB «copying» for your replies in this forum… :wink:

Bye

I guessed at everything in table B that wasn’t in table A.

But very poor description of the problem.

I’m with ya on that last post though, Hi Viki!

nope

all i’m saying is that the sample data sucks

it is not at all clear what is required here

You’ll need either to show other data that relate the data in the two tables or explain better what you are trying to do.

BTW, are you the same poster using a different name?

bazz

the “do_table” schema belongs to our old friend viki1967

see

considering all the trouble “viki” had with sql, i’m not surprised if she came back as a different member like “chevy”

how the heck does 1 KEVIN plus 1 HUMPREY produce 1 HUMPREY, and 4 ROBERT plus 4 MARGOT produce 4 MARGOT, but 3 CINDY plus 3 LAURA doesn’t produce anything???

the sample data sucks

So are you saying that it can’t be done?

do a left join, start with table B and check for nulls