1) select 1 from table where key = value;
2) select count(1) from table where key = value;
The first alternative should give you no result or one result, the second count should be zero or one.
About Mohaideen Jamil
Am currently working as a Struts 2 Developer in a reputed IT Organisations.
I can help you with teaching Core java and Struts 2. Follow me on Facebook or Google Plus. If you like my tutorials, consider making a donation to this charity, thanks.