mysql - Displaying value from one table that doesn't have an id number in another -
hi guys i've been on awhile no solutions. i've tried similar codes similar questions still no results. i have 2 tables id column link 1 another. on second table id assign product item. id column on first table doesn't necessary have every id associated items on second table. how write query display items not listed on first table i've tried select items product join shop product.productid != shop.productid; also tried select productid product productid not in (select productid shop); with no luck, using mysql guys your second solution should work . . . unless shop.productid takes on null value. try this: select productid product productid not in (select productid shop productid not null);