if select * from table where x=1 returns 0 rows, then I need select * from table where x=2 [or some other query]. Is it possible to do this in a si
select * from table where x=1
select * from table where x=2 [or some other query]
you can use EXIST and NOT EXIST statement to check that result is null or not. if result is Null then you can get value from table2.