Ajouter biblio
This commit is contained in:
33
biblio
Normal file
33
biblio
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#exo 1
|
||||||
|
INSERT INTO Auteurs (nom, prenom) VALUES ('Dumas', 'Alexandre');
|
||||||
|
INSERT INTO Auteurs (nom, prenom) VALUES ('J.K', 'Rowling');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO Livres (titre, annee_publication, auteur_id ) VALUES ('Les Trois Mousquetaires', 1844, 15);
|
||||||
|
INSERT INTO Livres (titre, annee_publication, auteur_id ) VALUES ('L\'Ickabog et 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 = 'Victor0';
|
||||||
|
|
||||||
|
SELECT * FROM Livres WHERE titre LIKE '%PARIS%';
|
||||||
|
|
||||||
|
|
||||||
|
#exo3
|
||||||
|
|
||||||
|
DELETE FROM Livres WHERE titre = 'Notre-Dame de Paris';
|
||||||
|
|
||||||
|
SELECT * FROM Livres WHERE titre = 'Notre-Dame de Paris';
|
||||||
|
|
||||||
|
|
||||||
|
#exo4
|
||||||
|
|
||||||
|
SELECT * FROM Livres WHERE nom = 'Hugo';
|
||||||
|
|
||||||
|
SELECT * FROM Livres WHERE annee_publication < 1900 AND nom = 'Hugo';
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user