I\'m using postgresql 9.1 and wish to select a single record from table. Details are as below :
table name : muser
fields present in table : userid,username,fir
When I'm dealing with filter where the value can be any including null I'll try add coalesce()
null
coalesce()
SELECT userid, mailid, phonenumber FROM muser WHERE coalesce(phonenumber,'no data') = coalesce(?,'no data') OR coalesce(mailid,'no data') = coalesce(?, 'no data');