0 0 votes Table 1T1AT1Baaabbbccc Table 2T2AT2BT2CaaabanullHow many tuples would the below query output:Select * from Table1where T1A = all (Select T2C from Table2 where T2A = 'b'); Databases query sql databases gate-preparation + – Wren Oswin 340 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
4 4 votes Subquery:SELECT T2C FROM Table2 WHERE T2A = 'b'; From Table2, where T2A = 'b', the result is:T2Cnull ALL with NULLs:When using = ALL (subquery) and the subquery returns NULL, the result of the comparison is UNKNOWN, which behaves like false in SQL's three-valued logic.So, for each row in Table1, the condition:T1A = ALL (NULL) evaluates to UNKNOWN → false. No rows from Table1 satisfy the condition.Output: 0 tuples paracetamol7mg answered May 25, 2025 paracetamol7mg comment Share Follow 0 reply Please log in or register to add a comment.