check if a table exsist in where
Posted
by Luca Romagnoli
on Stack Overflow
See other posts from Stack Overflow
or by Luca Romagnoli
Published on 2010-06-02T14:16:43Z
Indexed on
2010/06/02
14:24 UTC
Read the original article
Hit count: 174
This query generates an error because table2 doesn't exist:
Select * FROM table WHERE table2.id IS NOT NULL
Is there anything like this for check the table2 before apply the check on the id?
Select * FROM table WHERE (EXIST(table2) AND table2.id IS NOT NULL) or not EXIST(table2)
Thanks
© Stack Overflow or respective owner