I have to run multiple selects on a table for and get resultset for 2 columns. One solution i found is by using UNION as below.
SELECT cap_id, cap_code FROM cap_master
where cap_type = 'Type1' and cap_desc = 'CapDesc1'
UNION
SELECT cap_id, cap_code FROM cap_master
where cap_type = 'Type2' and cap_desc = 'CapDesc2'
Is there any other way to do this. There could be some 10-20 select statements in one go. Will this affect performance, if so what would be a better approach.