Could it be IF
within FROM
?
I searched but could not find anything about it.
Here is an example of what I want to do:
SELECT usuario.* FROM (
SELECT
IF(
(SELECT COUNT(*) FROM pessoa) > 0,
SELECT FROM pessoa,
SELECT * FROM clliente,
) AS usuario
)
NOTE: Since the bank architecture was developed the worst way, I'm having to do some crazy SQL.