Escolar Documentos
Profissional Documentos
Cultura Documentos
(colunas nesta ordem) dos alunos do curso 26, ordenando os registros através
da MGP em ordem descendente;
MAT_ALU "MATRÍCULA",
FROM ALUNOS
WHERE COD_CURSO = 26
FROM CURSOS
ORDER BY COD_CURSO;
UPDATE CURSOS
SET IDT_PROF = 4816
4) Elabore uma consulta SQL que liste todos os períodos letivos que não
possuam históricos, matrículas e turmas vinculadas;
where (h.ANO is null and h.SEMESTRE is null) and (m.ANO is null and
m.SEMESTRE is null) and (t.ANO is null and t.SEMESTRE is null)
ou
where not
and pl.semestre=h.semestre
and pl.ano=t.ano
and pl.semestre=t.semestre)
ORDER BY pl.ANO
DESC, pl.SEMESTRE;
DELETE
FROM periodos_letivos p
);
DELETE
FROM PERIODOS_LETIVOS
(SELECT pl.ANO,
pl.SEMESTRE
FROM PERIODOS_LETIVOS pl
ON (pl.ANO = h.ANO
ON (pl.ANO = t.ANO
);