Escolar Documentos
Profissional Documentos
Cultura Documentos
-- removendo aluno
delete from aluno
WHERE codaluno = 1;
-- reinserindo o aluno;
INSERT INTO aluno (nomealuno, medaluno) VALUES('CESAR JOAO DA SILVA', null);
update aluno a1
set medaluno = (select avg(n.vlrnota)
from nota n
where n.codaluno = a1.codaluno)
where a1.codaluno = 4;
select
a1.codaluno "C�digo",
a1.nomealuno "Nome",
n1.nravaliacao "Prova",
n1.vlrnota "Nota",
a1.medaluno "M�dia"
from aluno a1,
nota n1
where a1.codaluno = n1.codaluno
and a1.codaluno = 4
order by n1.nravaliacao ;