Skip to content

Commit

Permalink
Update Query.sql
Browse files Browse the repository at this point in the history
Added the final code
  • Loading branch information
mateusadada committed Sep 26, 2024
1 parent 6fd9524 commit 90079c6
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions solved_exercises/VPL/8 - Comandos SQL no banco SQLite/Query.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
/* ################### */

/* Digite aqui seu SQL */

/* ################### */
UPDATE aluno
SET nome= "Heloisa Oliveira"
WHERE aluno.aluno_key = 5;

INSERT INTO aluno (aluno_key,nome, ingresso, sexo_key, cidade_key)
VALUES (10,'João de Matos', 2019, 1, 3);

DELETE FROM aluno
WHERE nome = 'Hermann Blumenau';

SELECT a.aluno_key, a.nome, a.ingresso, c.nome, s.nome, disciplina.sigla
FROM aluno a
JOIN matricula m ON a.aluno_key = m.aluno_key
JOIN cidade c ON a.cidade_key = c.cidade_key
JOIN sexo s ON a.sexo_key = s.sexo_key
JOIN disciplina ON m.disciplina_key = disciplina.disciplina_key
WHERE disciplina.sigla = 'REC-I';

0 comments on commit 90079c6

Please sign in to comment.