Advertisement
noam76

Create table.mysqli

May 11th, 2023 (edited)
929
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.46 KB | None | 0 0
  1. CREATE TABLE appartement (
  2.   id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  3.   numero_appartement VARCHAR(30) NOT NULL,
  4.   nom_locataire VARCHAR(30) NOT NULL,
  5.   prenom_locataire VARCHAR(30) NOT NULL
  6. );
  7.  
  8. CREATE TABLE finance (
  9.   id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  10.   id_appartement INT(6) UNSIGNED,
  11.   date_payement DATE,
  12.   montant_entree DECIMAL(10,2),
  13.   montant_sortie DECIMAL(10,2),
  14.   FOREIGN KEY (id_appartement) REFERENCES appartement(id)
  15. );
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement