I have two tables person, registered.
Person table has personId, personName.
registered table has personId, registerId ----- personId in this table is the same personId of person table.
I want to get the personId from person table who are not in registered table.
Iam using the below query to get the above result:
select * from person where personId not in (select personId from registered);
If i run this in mysql command prompt it is giving me the following error:
[root@localhost:3306] ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select personId from registered)' at line 1
Any help is appreciated. Iam using MySql 4.0