From e82de84656ff381a01927d00a55e50144542d013 Mon Sep 17 00:00:00 2001 From: "fahym.bouaichi" Date: Mon, 13 Oct 2025 11:37:56 +0000 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"/"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DevoirSqlFahym.sql | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 DevoirSqlFahym.sql diff --git a/DevoirSqlFahym.sql b/DevoirSqlFahym.sql new file mode 100644 index 0000000..c5476c6 --- /dev/null +++ b/DevoirSqlFahym.sql @@ -0,0 +1,30 @@ +INSERT INTO Auteurs (nom, prenom) VALUES ('Dumas', 'Alexandre'); +INSERT INTO Auteurs (nom, prenom) VALUES ('JK', 'Rowling'); + + +INSERT INTO Livres (titre, annee_publication, auteur_id ) VALUES ('Les Trois Mousquetais', 1844, 15); +INSERT INTO Livres (titre, annee_publication, auteur_id ) VALUES ('Jack et la grande aventure du cochon de Noël', 2020, 3); + + +#exo2 + +SELECT * FROM Livres WHERE annee_publication < 1900; + + +SELECT * FROM Auteurs WHERE prenom = 'Victor'; + +SELECT * FROM Livres WHERE titre LIKE '%PARIS%'; + + +#exo3 + +DELETE FROM Livres WHERE titre = 'NotreDame de Paris'; + +SELECT * FROM Livres WHERE titre = 'NotrEDame de Paris'; + + +#exo4 + +SELECT * FROM Livres WHERE nom = 'Hugo'; + +SELECT * FROM Livres WHERE annee_publication < 1900 AND nom = 'Hugo';