Aller au contenu principal
Nom Type Null Clé Défaut Extra
id_rendezvous int(11) Non Clé primaire NULL -
date date Oui - NULL -
heure time Oui - NULL -
duree int(11) Oui - NULL -
id_patients int(11) Oui Clé étrangère NULL -
id_medecins int(11) Oui Clé étrangère NULL -
motif text Oui - NULL -
notes text Oui - NULL -
Requête CREATE TABLE
CREATE TABLE `Rendez_vous` (
  `id_rendezvous` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `heure` time DEFAULT NULL,
  `duree` int(11) DEFAULT NULL,
  `id_patients` int(11) DEFAULT NULL,
  `id_medecins` int(11) DEFAULT NULL,
  `motif` text DEFAULT NULL,
  `notes` text DEFAULT NULL,
  PRIMARY KEY (`id_rendezvous`),
  KEY `id_patient` (`id_patients`),
  KEY `id_medecin` (`id_medecins`),
  CONSTRAINT `Rendez_vous_ibfk_1` FOREIGN KEY (`id_patients`) REFERENCES `Patients` (`id_patients`),
  CONSTRAINT `Rendez_vous_ibfk_2` FOREIGN KEY (`id_medecins`) REFERENCES `Medecins` (`id_medecins`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci

Types de clés

  • Clé primaire Clé primaire (identifiant unique)
  • Unique Valeur unique dans la colonne
  • Clé étrangère Index pour accélérer les recherches

Exemples de requêtes

SELECT * FROM Rendez_vous LIMIT 10;
SELECT COUNT(*) FROM Rendez_vous;
DESCRIBE Rendez_vous;

Prêt à tester des requêtes ?

Ouvrir l'éditeur SQL