Questão 32 · TJ-RN 2020 · Servidor Temporário de TIC – Administrador de Sites (Web Master) · COMPERVE/UFRN

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, é:
  1. 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))
  2. 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
  3. 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))
  4. 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))
Responder e ver o gabarito comentado →

Grátis, sem cartão. No Chip você responde, vê o gabarito e o comentário com a pegadinha, o macete e o fundamento na lei.