Pular para o conteúdo principal

Questão de Banco de Dados — MySQL — COMPERVE - UFRN 2020

Banco de DadosMySQL
Código
qq571641
Banca
COMPERVE - UFRN
Órgão
TJ-RN
Ano
2020
Nível
Superior
Cargo
COMPERVE - - Administrador de Sites
O MySQL assim como outros bancos de dados possibilita a criação de subc onsultas. A consulta que possui sintaxe correta, quando executada no MySQL versão 8, é:
  1. ASELECT 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. BSELECT 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. CSELECT 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. DSELECT 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))
Revelar gabarito e comentário

GabaritoA — 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))

Link permanente: /questoes/qq571641