From: Nuno Tavares Date: June 10 2011 11:54pm Subject: Re: How to find values which do not return any tuple in "IN" clause List-Archive: http://lists.mysql.com/mysql/225223 Message-Id: <4DF2AE99.8070502@dri.pt> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit create table dim (value varchar(10), primary key(value)); insert into dim values ('aaa'),('bbb'),('ccc'),('ddd'); SELECT tablename.fieldname FROM dim LEFT JOIN tablename ON tablename.fieldname = dim WHERE tablename.fieldname IS NULL; If this is not what intended, I'd suggest you to spend a little more effort in formulating a more clear question, maybe with an example. -NT Em 10-06-2011 23:36, Fahim Mohammad escreveu: > Hi > > select * from tablename where fieldname in ('aaa','bbb','ccc','ddd'); > > return only the successful hit. > > How can I know how many out of four ('aaa','bbb','ccc','ddd') resulted in a > miss OR which values do not return any tuple. > > Thanks > > Fahim >