1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| drop table MEMBRE cascade constraints;
/*==============================================================*/
/* Table : MEMBRE */
/*==============================================================*/
create table MEMBRE
(
NUM_MEMBRE NUMBER(6) not null,
NOM VARCHAR2(80) not null,
PRENOM VARCHAR2(80) not null,
RUE VARCHAR2(100) not null,
CP CHAR(5) not null,
VILLE VARCHAR2(50) not null,
TELEPHONE CHAR(10),
ADHESION DATE not null,
DUREE NUMBER(2) not null,
constraint PK_MEMBRE primary key (NUM_MEMBRE),
constraint CK_MEMBRES_DUREE check (DUREE>0)
);
drop sequence MEMBRE_SEQ;
Create sequence MEMBRE_SEQ;
Insert into MEMBRE (NUM_MEMBRE, NOM, PRENOM, RUE, CP, VILLE, TELEPHONE, ADHESION, DUREE) values (MEMBRE_SEQ.nextval, 'ALBERT', 'Marc', '13 rue des alpes', '69008', 'Lyon', '0601020304', sysdate-60, 1);
Insert into MEMBRE (NUM_MEMBRE, NOM, PRENOM, RUE, CP, VILLE, TELEPHONE, ADHESION, DUREE) values (MEMBRE_SEQ.nextval, 'BERNAUDET', 'Barnabé', '6 rue des bécasses', '69007', 'Lyon', '0602030105', sysdate-10, 3);
COMMIT;
select * from membre; |
Partager