Sub Query

2005-11-14 Thread Herman Scheepers
Hi Could anyone help perhaps tell me why the following simple query containing a sub-query gives a syntax error. select 1 from messages where not exists ( select 1 from message_push_notifications where message_id = messages.id) Thanx Herman

Creating primary and foreign keys for MySQL

2004-10-13 Thread Herman Scheepers
Hi All I am MySQL newby with an Oracle background. Is the following syntax suported? alter table members add primary key (id); alter table members add constraint members_uk unique (name); Thanx Herman __ Do you Yahoo!? Yahoo! Mail Address

Foreign key error

2004-10-13 Thread Herman Scheepers
I tried to create a foreign key using: ALTER TABLE msg_recipients ADD CONSTRAINT msg_recipient_member_fk FOREIGN KEY (recipient_member_id) REFERENCES members (id); and got this error: Can't create table '.\wapmagic\#sql-c50_48.frm' (errno: 150) Any ideas? Thanx Herman