> Dear Friends, > > I am using mysql 3.23.42. I want to execute one > query to get specific result but not getting the > correct result. > > I have 2 tables named: ContactList and GroupList. <snip>
> - Now I want to get those 'nickname' from > ContactList which do not appear in GroupList with > following condition: > ContactList.username = 'gaurang' > ContactList.username = GroupList.username > groupname = 'friend' <snip> Try using a left join. Bob Hall explains the concept very well on this page: http://users.starpower.net/rjhalljr/MySQL/sql.html / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php