O MySQL assim como outros bancos de dados possibilita a criação de subconsultas. A consulta que possui sintaxe correta, quando executada no MySQL versão 8, é:
- A)SELECT coluna1 FROM t1 AS x WHERE x.coluna1 = (SELECT coluna1 FROM t2 AS x WHERE x.coluna1 = (SELECT coluna1 FROM t3 WHERE x.coluna2 = t3.coluna1))
- B)SELECT coluna1 FROM t1 AS x WHERE x.coluna1 = SELECT coluna1 FROM t2 AS x WHERE x.coluna1 = SELECT coluna1 FROM t3 WHERE x.coluna2 = t3.coluna1
- C)SELECT coluna1 FROM t1 AS x WHERE x.coluna1 = (SELECT coluna1 FROM t2 AS x WHERE x.coluna1 = (SELECT FROM t3 WHERE x.coluna2 = t3.coluna1))
- D)SELECT coluna1 FROM t1 AS x WHERE x.coluna1 = (SELECT coluna1 FROM t2 AS x WHERE x.coluna1 = (SELECT coluna1 FROM t3 WHERE x.coluna2.t3.coluna1))