MySQL Forums
Forum List  »  Newbie

Re: Dividing a count by another count
Posted by: Adelie Saunier
Date: September 01, 2020 04:27AM

I can't hard copy "Show Create Table" results but i can show you how i write my table "loan" and my table "customer",


CREATE TABLE EMPRUNT(
code_emprunt int PRIMARY KEY,
date_empunt date NOT NULL,
date_retour date NOT NULL,
code_matricule int NOT NULL,
code_localisation int NOT NULL,
CONSTRAINT ABONNE_EMPRUNT_FK FOREIGN KEY (code_matricule) REFERENCES ABONNE (code_matricule)
CONSTRAINT EXEMPLAIRE_EMPRUNT_FK FOREIGN KEY (code_localisation) REFERENCES EXEMPLAIRE (code_localisation)
;

CREATE TABLE ABONNE(
code_matricule int PRIMARY KEY,
nom varchar (50) NOT NULL,
prenom varchar (50) NOT NULL,
adresse varchar (100) NOT NULL,
num_tel varchar (13) NOT NULL,
date_adhesion date NOT NULL,
date_naissance date NOT NULL,
cat_pro varchar (50) NOT NULL
);

Options: ReplyQuote


Subject
Written By
Posted
Re: Dividing a count by another count
September 01, 2020 04:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.