It's easy to find all the users ids who have trait.color = "green" but I need to find all the people who don't. The obvious way is a subselect for all the ids where not exists (select id where trait.color = "green') but I was trying to think if there's a way to do it without a subselect. Is there some trick I don't know about?
sybase 12.5 No foreign keys, but the table is a one to many relationship. Just imagine a simple
ID trait
-- -----
1 yellow
1 green
1 blue
2 yellow
2 blue
2 black
3 yellow
3 green
3 black