select in select

2002-05-21 Thread van den Heuvel, Frank
Hello, I would like to do this witihn mysql: SELECT con.id,con.name FROM contacts con, registrar_contact reg WHERE NOT con.id IN (SELECT contactid FROM registrar_contact WHERE registrarid=1) can someone tell me how to do this ? contacts table consists of: id(primary key) name

select in select

2002-05-21 Thread van den Heuvel, Frank
Hello, I would like to do this witihn mysql: SELECT con.id,con.name FROM contacts con, registrar_contact reg WHERE NOT con.id IN (SELECT contactid FROM registrar_contact WHERE registrarid=1) can someone tell me how to do this ? contacts table consists of: id(primary key) name

foreign keys for relation ships

2002-03-11 Thread van den Heuvel, Frank
Hello, I am creating tables within MySql 3.23.49. I want to add relation ships between different tables. I tried to do this with foreign key statements. For example: CREATE TABLE domains ( domain varchar(100) NOT NULL, registrarid int(10) NOT NULL, foreign key (registrarid) REFERENCES