From 90079c67daeef25b1f541eba1df46fc34deb55d9 Mon Sep 17 00:00:00 2001 From: Mateus Adada Date: Thu, 26 Sep 2024 18:45:46 -0300 Subject: [PATCH] Update Query.sql Added the final code --- .../Query.sql | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/solved_exercises/VPL/8 - Comandos SQL no banco SQLite/Query.sql b/solved_exercises/VPL/8 - Comandos SQL no banco SQLite/Query.sql index baadc84..b601e6e 100644 --- a/solved_exercises/VPL/8 - Comandos SQL no banco SQLite/Query.sql +++ b/solved_exercises/VPL/8 - Comandos SQL no banco SQLite/Query.sql @@ -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';