On Mon, 25 May 2009 23:14:50 +0200, Leo Freitag
<leofrei...@netcologne.de> wrote:

>Hallo,
>
>I have a table 'person' and a table 'group'. Every person can join none, 
>one or more groups.
>No I want to select all persons except those who are member in group 1. 
>- Sounds simple, but not for me.

This is an n:m relationship.
If group has more attributes (columns) than just its number,
you need a third table: person_group.
Then join person with person_group where group_id != 1;

The person_group table could be called membership, if you
like.

>Thanks in advance
>Leo
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to