I am trying to write a query which checks whether multiple tables have been populated, so I have to check multiple tables, in case that only one of them has 0 records then I have to return 'No' in output, otherwise if all of those tables have more than 0 (i.e 1,2,3... records) it should return 'YES'.
I have already tried using:
SELECT
CASE WHEN (SELECT COUNT(*) FROM LorikSkema.TABLE1) > 0 THEN 'YES'
ELSE 'NO'
END FROM DUAL;
This seems to work for only one table, but I'm having trouble finding a suitable query for multiple tables based on this logic.