63 lines
853 B
SQL
63 lines
853 B
SQL
//1
|
|
SELECT *
|
|
FROM Buveur;
|
|
|
|
//2
|
|
SELECT NumBuveur, NomB, VilleB
|
|
FROM Buveur;
|
|
|
|
//3
|
|
SELECT NumBuveur, NomB
|
|
FROM Buveur
|
|
WHERE VilleB = 'PARIS';
|
|
|
|
//4
|
|
SELECT NumBuveur, NomB
|
|
FROM Buveur
|
|
WHERE VilleB = 'PARIS' OR VilleB = 'MACON';
|
|
|
|
//5
|
|
SELECT cru
|
|
FROM Vin
|
|
WHERE Region = 'LOIRE';
|
|
//ou
|
|
SELECT DISTINCT cru
|
|
FROM Vin
|
|
WHERE Region = 'LOIRE';
|
|
|
|
//6
|
|
SELECT DISTINCT VilleB
|
|
FROM Buveur;
|
|
|
|
//7
|
|
SELECT NumCom
|
|
FROM Commande
|
|
WHERE Qtte > 10 AND Qtte < 50;
|
|
//ou
|
|
SELECT NumCom
|
|
FROM Commande
|
|
WHERE Qtte BETWEEN 10 AND 50;
|
|
|
|
//8
|
|
SELECT NumCom
|
|
FROM Livraison
|
|
WHERE DateLiv > '1-DEC-1987';
|
|
|
|
//9
|
|
SELECT NumVin, cru
|
|
FROM Vin
|
|
WHERE cru LIKE 'B%';
|
|
|
|
//10
|
|
SELECT NumVitic, NomV
|
|
FROM Viticulteur
|
|
WHERE NomV LIKE '%LIN%';
|
|
|
|
//11
|
|
SELECT NumBuveur, NomB
|
|
FROM Buveur
|
|
WHERE VilleB != 'PARIS' AND VilleB != 'MACON';
|
|
//ou
|
|
SELECT NumBuveur, NomB
|
|
FROM Buveur
|
|
WHERE VilleB NOT IN('PARIS', 'MACON'); |