-1
It would be possible to do IF
within the FROM
?
I looked but couldn’t find anything about it.
Follow 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: As the bank architecture was developed in the worst way, I’m having to do some crazy things in SQL.
I’m pretty sure I don’t (because I just tested it here), but I’m sure what you need can be done differently. Do you have any real example of what you need to do with it?
– Daniel Dutra