I need to compare multiple values of a table with same set of values in single shot without using multiple AND condition in WHERE clause. Please let me know is any methods to do it.
code:
select count(1)
from test
where pre_sys_id1 in (select sys_id from test where auto_id = 10)
and pre_sys_id2 in (select sys_id from test where auto_id = 10)
and pre_sys_id3 in (select sys_id from test where auto_id = 10)
and pre_sys_id4 in (select sys_id from test where auto_id = 10)
;