sql server - SQL query diversification -


how can diversify sql query in following manner:

if condition_a select * x
if condition b select * b x

it seems trivial operation, cannot find or figure out solution.

you can use if condition

if condition_a  begin  select * x  end if condition_b begin  select * b x end 

if there can 1 condition satisfied out of two, change second if else statement


Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -