Log in

View Full Version : Need records of unmatched


venkateshan
Apr 3, 2014, 08:57 PM
hi all,

I want to get the records which is not in DB.
For example;
this is my db values

id name mark
-- ---- ----
cs1 aa 89
cs2 bb 88
cs3 cc 80


select id from table where id in('cs1','cs2','cs3','cs4')
--------------------------------------------------------

here I will get the result
cs1,cs2,cs3.

but I want get only the unmatched column cs4


some on help me please

ScottGem
Apr 4, 2014, 04:43 AM
This is unclear. If you only want records that have an ID of cs4, then just use:

WHERE id = 'cs4'