SQL if select statement returns no rows then perform alternative select statement

Viewed 70727

Basically, what syntex would allow me to achieve the title statement?

If (select statement 1) returns 0 rows THEN (select statement 2) else (select statement 3)

So that the sql returns results from either statement 2 or 3 I've looked for a way to do this but nothing I've found so far seems to exactly address the if requirements.

3 Answers
Related