guys, can anyone help me on this problem? i have two tables then what I want is that, when an identical item is found in table2, it will not be displayed.

Example:

Table1                             Table2
item1                               other1
item2                               other2
item3                               item2
item4                               item3

Condition:
if we use this query: select * from Table1 the items from Table1 will appear but if the items of Table1 exists in Table2 then i must not be displayed.

how can i do that? thanks

select distinct
Or
use a union and make it distict.

Can you post your full query?

You can try

select name from Table2 where name not in (select * from Table1)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.