MySQL Forums
Forum List  »  Portuguese

Subquery com mais de um registro
Posted by: Ilano Ilano
Date: July 27, 2020 06:54AM

Olá pessoal,

Tenho três tabelas:
- Cursos;
- Disciplinas;
- Pré-Requisitos.

Preciso que na consulta abaixo, a coluna PreRequisiquisito traga todas as informações de pré-requisitos daquela disciplina.

SELECT, A.codigo, A.nome AS Curso,
B.nome AS Disciplina,

(SELECT X.descricao FROM prerequisitos X
WHERE X.curso_id = AND X.disciplina_id =

FROM cursos A
INNER JOIN disciplinas B ON (B.curso_id =

Alguém poderia me ajudar?



Options: ReplyQuote

Written By
Subquery com mais de um registro
July 27, 2020 06:54AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.