Jump to content

finding records that are not in another table


G3L0

Recommended Posts

hello. i've a problem here. i have 3 tables test1, test2, test3 that have SN and name as the field.when i want to search SN that match in that 3 tables i use this statement:select p.* from test1 p, test2 q, test3 r where p.mac_sn=q.mac_sn and p.mac_sn=r.mac_sn;it works. but how can i find SN that are not the same. Maybe this SN exist in test1 and test2 or test2 and test3 or test1 and test3 or even exist only in test1 or test2 or test3. i use '!=' to replace '=' in the statement above but what i get isn't wha i want. i've try it from yesterday and still can't figure it out.pls help me. thx

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...