-- =====================================================================
--  EXERCICE 2 - Faire évoluer une structure (cabinet médical)
-- =====================================================================

CREATE TABLE Patient (
    id_patient      INT          PRIMARY KEY,
    nom             VARCHAR(30)  NOT NULL,
    prenom          VARCHAR(30)  NOT NULL,
    date_naissance  DATE
);

INSERT INTO Patient (id_patient, nom, prenom, date_naissance) VALUES
(1, 'Martin',               'Louise',  '1958-04-17'),
(2, 'Bernard',              'Paul',    '1972-11-02'),
(3, 'Dubois',               'Emma',    '1985-06-23'),
(4, 'Thomas',               'Jules',   '1991-01-30'),
(5, 'Robert',               'Inès',    '2003-09-14'),
(6, 'Le Goff-Kerjean',      'Yann',    '1966-08-05');

ALTER TABLE Patient
    ADD COLUMN telephone VARCHAR (15);

ALTER TABLE Patient
    MODIFY COLUMN nom VARCHAR (80);

ALTER TABLE Patient 
    ADD COLUMN numero_secu VARCHAR (50) UNIQUE;

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: