SQL Server, Hopital
Par Matt • 20 Mai 2018 • 1 231 Mots (5 Pages) • 616 Vues
...
Dans l’analyseur de requêtes, appliquez le script suivant :
-- Remplissage de la table CHAMBRE :
insert into chambre values ( 1, 2 ) ;
insert into chambre values ( 2, 3 ) ;
insert into chambre values ( 3, 1 ) ;
insert into chambre values ( 4, 2 ) ;
insert into chambre values ( 5, 3 ) ;
insert into chambre values ( 6, 3 ) ;
insert into chambre values ( 7, 1 ) ;
insert into chambre values ( 8, 2 ) ;
-- Remplissage de la table MALADE :
insert into malade values ( 12, 'Duron', 'Jean', '2 rue Vauquelin', '14000', 'Caen', 'M', '02/02/1920' ) ;
insert into malade values ( 15, 'Duflan', 'Gilberte', '12 place Blot', '14200', 'Hérouville', 'F', '15/10/1940' ) ;
insert into malade values ( 16, 'Laronche', 'Arlequin', '5 rue Orsel', '14440', 'Bayeux', 'M', '23/03/1928' ) ;
insert into malade values ( 18, 'Desrieux', 'Domino', '45 avenue Pompidou', '14000', 'Caen', 'M', '17/02/1970' ) ;
insert into malade values ( 20, 'Galand', 'Gédéon', '21 rue Quincampois', '14000', 'Caen', 'M', '29/04/1955' ) ;
insert into malade values ( 21, 'Xénon', 'Colombine', '5 route de Lyon', '14440', 'Bayeux', 'F', '10/07/1935' ) ;
insert into malade values ( 11, 'Laronche', 'Gontran', '2 rue aux ours', '14000', 'Caen', 'M', '12/03/1920' ) ;
insert into malade values ( 10, 'Lalaire', 'Gilles', '12 avenue Juin', '14000', 'Caen', 'M', '12/04/1938' ) ;
-- Remplissage de la table OCCUPER :
insert into occuper values (1, 12, '15/01/2014' ) ;
insert into occuper values (1, 21, '09/02/2014' ) ;
insert into occuper values (3, 15, '15/01/2014' ) ;
insert into occuper values (3, 20, '09/02/2014' ) ;
insert into occuper values (4, 16, '15/01/2014' ) ;
insert into occuper values (5, 18, '09/02/2014' ) ;
insert into occuper values (5, 15, '12/02/2014' ) ;
insert into occuper values (1, 21, '19/11/2014' ) ;
-- Remplissage de la table VISITER :
insert into visiter values (5, 15, '10/02/2014' ) ;
insert into visiter values (8, 16, '10/02/2014' ) ;
insert into visiter values (8, 21, '12/02/2014' ) ;
insert into visiter values (10, 15, '15/02/2014' ) ;
insert into visiter values (5, 12, '10/02/2014' ) ;
insert into visiter values (10, 16, '11/02/2014' ) ;
insert into visiter values (13, 18, '12/04/2014' ) ;
insert into visiter values (13, 20, '12/05/2014' ) ;
insert into visiter values (10, 12, '15/02/2014' ) ;
insert into visiter values (10, 18, '15/02/2014' ) ;
insert into visiter values (10, 21, '15/02/2014' ) ;
insert into visiter values (8, 11, '10/02/2014' ) ;
insert into visiter values (8, 21, '10/02/2014' ) ;
insert into visiter values (8, 15, '10/02/2014' ) ;
-- Remplissage de la table ORDONNANCE :
insert into ordonnance values ( 1, 20, 8 ) ;
insert into ordonnance values ( 2, 12, 12 ) ;
insert into ordonnance values ( 3, 20, 13 ) ;
insert into ordonnance values ( 4, 12, 5 ) ;
insert into ordonnance values ( 5, 15, 10 ) ;
insert into ordonnance values ( 6, 21, 8 ) ;
insert into ordonnance values ( 7, 16, 12 ) ;
insert into ordonnance values ( 8, 18, 8 ) ;
insert into ordonnance values ( 9, 20, 5 ) ;
insert into ordonnance values ( 10, 21, 5 ) ;
insert into ordonnance values ( 11, 21, 5 ) ;
insert into ordonnance values ( 12, 15, 10 ) ;
-- Remplissage de la table MEDICAMENT :
insert into medicament values ( 4582, 'Rustine' ) ;
insert into medicament values ( 4810, 'Superglu' ) ;
insert into medicament values ( 5210, 'Charbon' ) ;
insert into medicament values ( 5774, 'Diluant' ) ;
insert into medicament values ( 5775, 'Viandox' ) ;
-- Remplissage de la table PRESCRIRE :
insert into prescrire values ( 1, 5774, 1, 'Soir' ) ;
...