dimanche 17 avril 2016

How to check which item is in one specific map

So I was trying to check which items belong to one specific map and I thought it should be like this(I have 3 maps:)

SELECT MapID from Map
WHERE NOT EXISTS 
( SELECT * from Item


WHERE Item.MapID = Map.MapID
AND Item.MapID = 'map002'

AND NOT EXISTS
( SELECT * from Item


WHERE Item.MapID = Map.MapID
AND Item.MapID = 'map001'));

The prob is: It shows me the maps and the 2nd AND NOT EXISTS doesn't work out. Any suggestions?

Aucun commentaire:

Enregistrer un commentaire