1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| CREATE TABLE "TYPE_PAIEMENT" (
"Paiement" TEXT NOT NULL UNIQUE,
PRIMARY KEY("Paiement")
);
INSERT INTO "TYPE_PAIEMENT" VALUES('CHOISIR');
INSERT INTO "TYPE_PAIEMENT" VALUES('A');
INSERT INTO "TYPE_PAIEMENT" VALUES('B');
INSERT INTO "TYPE_PAIEMENT" VALUES('C');
INSERT INTO "TYPE_PAIEMENT" VALUES('D');
INSERT INTO "TYPE_PAIEMENT" VALUES('E');
CREATE TABLE "TEST" (
"Date" TEXT,
"Valeur" TEXT,
"Libellé" REAL,
"Débit" REAL,
"Crédit" REAL,
"Solde" TEXT,
"Paiement" TEXT NOT NULL DEFAULT ('CHOISIR'),
FOREIGN KEY("Paiement") REFERENCES "TYPE_PAIEMENT"("Paiement")
);
INSERT INTO "TEST" ("Date","Valeur","Libellé","Débit","Crédit","Solde") VALUES ('03/08/20','x',0,0,0,'X');
INSERT INTO "TEST" ("Date","Valeur","Libellé","Débit","Crédit","Solde") VALUES ('04/08/20','y',0,0,0,'Y');
INSERT INTO "TEST" ("Date","Valeur","Libellé","Débit","Crédit","Solde") VALUES ('05/08/20','z',0,0,0,'Z'); |
Partager