-- Exo 1

INSERT INTO hotel (nom, ville, etoiles)
VALUES ('Hotel de Luminy', 'Marseille', '1') ;

INSERT INTO chambre (numhotel, numchambre, prixnuitht, type, etage)
VALUES (13, 39, 10, 'simple', 3) ;

DELETE FROM hotel
WHERE
ville = 'Marseille'
AND
nom = 'Hotel de Luminy'

INSERT INTO chambre (numhotel, numchambre, prixnuitht, type, etage)
VALUES
(13, 1, 10, 'simple', 1),
(13, 2, 10, 'simple', 1),
(13, 3, 10, 'simple', 1),
(13, 4, 10, 'simple', 1)
;

UPDATE chambre
SET type='double'
WHERE
numchambre % 2 == 0
AND
numhotel = 13
;

UPDATE chambre
SET type='triple'
WHERE
numchambre % 2 == 1
AND
numhotel = 13
;

UPDATE hotel SET etoiles = etoiles + 1
WHERE nom LIKE '%terminus%' ;
