Subqueries Extra: No tables used 1 row in set (0.01 sec) mysql>  SELECT * FROM t2; Empty set (0.01 sec) This is because the  SELECT  statement did not reference any tables, as can be seen in the  table  and Extra  columns of the output. This is also true of the following nested  SELECT : mysql>  EXPLAIN SELECT NOW() AS a1, (SELECT f1(5)) AS a2\G *************************** 1. row *************************** id: 1 select_type: PRIMARY table: NULL type: NULL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: NULL filtered: NULL Extra: No tables used 1 row in set, 1 warning (0.00 sec) mysql>  SHOW WARNINGS; +-------+------+------------------------------------------+ | Level | Code | Message | +-------+------+------------------------------------------+ | Note | 1249 | Select 2 was reduced during optimization | +-------+------+------------------------------------------+ 1 row in set (0.00 sec) mysql>  SELECT * FROM t2; Empty set (0.00 sec) However, if the outer  SELECT  references any tables, the optimizer executes the statement in the subquery as well, with the result that  t2  is modified: mysql>  EXPLAIN SELECT * FROM t1 AS a1, (SELECT f1(5)) AS a2\G *************************** 1. row *************************** id: 1 select_type: PRIMARY table: <derived2> partitions: NULL type: system possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 1 filtered: 100.00 Extra: NULL *************************** 2. row *************************** id: 1 select_type: PRIMARY table: a1 partitions: NULL type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 1 filtered: 100.00 Extra: NULL *************************** 3. row *************************** 2693