drop table "USER" cascade constraints; /*==============================================================*/ /* Table: "USER" */ /*==============================================================*/ create table "USER" ( USER_ID NUMBER(4) not null, USER_NAME VARCHAR2(15) not null, USER_PASSWORD VARCHAR2(8) not null, USER_SFJE NUMBER(8,2) not null, USER_DFJE NUMBER(8,2) not null, USER_SUM NUMBER(8,2) not null, USER_DATE DATE not null, constraint PK_USER primary key (USER_ID) ); comment on table "USER" is ‘用户表‘; comment on column "USER".USER_ID is ‘用户id‘; comment on column "USER".USER_NAME is ‘用户名称‘;
alter table WATER drop constraint FK_WATER_REFERENCE_USER; drop table WATER cascade constraints; /*==============================================================*/ /* Table: WATER */ /*==============================================================*/ create table WATER ( USER_ID NUMERIC(4), W_MONTH CHAR(6), W_YL NUMBER(8,2), W_SFJE NUMBER(8,2), W_SFJF CHAR(6) ); alter table WATER add constraint FK_WATER_REFERENCE_USER foreign key (USER_ID) references "USER" (USER_ID);
alter table POWER drop constraint FK_POWER_REFERENCE_USER; drop table POWER cascade constraints; /*==============================================================*/ /* Table: POWER */ /*==============================================================*/ create table POWER ( USER_ID NUMBER(4) not null, P_MONTH CHAR(5) not null, P_YL NUMERIC(8, 2) not null, P_DFJE NUMERIC(8, 2) not null, P_SFJF CHAR(6) ); alter table POWER add constraint FK_POWER_REFERENCE_USER foreign key (USER_ID) references "USER" (USER_ID);
drop table MONEY cascade constraints; /*==============================================================*/ /* Table: MONEY */ /*==============================================================*/ create table MONEY ( M_MONTH CHAR(5) not null, M_SF NUMBER(8,2) not null, M_DF NUMBER(8,2) not null );
drop table ADMIN cascade constraints; /*==============================================================*/ /* Table: ADMIN */ /*==============================================================*/ create table ADMIN ( ADMIN_ID NUMBER(10) not null, ADMIN_NAME VARCHAR2(20) not null, ADMIN_PW VARCHAR2(10) not null, CREAD_TIME DATE, constraint PK_ADMIN primary key (ADMIN_ID) ); comment on table ADMIN is ‘管理员表‘; comment on column ADMIN.ADMIN_ID is ‘管理员id‘; comment on column ADMIN.ADMIN_NAME is ‘管理员名称‘; comment on column ADMIN.ADMIN_PW is ‘密码‘; comment on column ADMIN.CREAD_TIME is ‘创建时间‘;
时间: 2024-11-08 19:24:24