SQL建表脚本:
1--建表
2--管理⼈员表 admin
3create table admin(
4 admin_id varchar2(3) not null,
5 admin_loginname varchar2(8) not null,
6 admin_password varchar2(6) not null,
7 admin_username varchar2(4) not null,
8constraint pk_admin primary key(admin_id)
9 );
11 comment on column admin.admin_loginname is'管理员登录⽤户名';
12 comment on column admin.admin_password is'管理员登录密码';
13 comment on column admin.admin_username is'管理员姓名';
14--⽤户基本信息表 user
15create table users(
16user_id varchar2(10) not null,
17 user_loginname varchar2(8) not null,曹魏皇帝
18 user_password varchar2(6) not null,
19 user_username varchar2(4) not null,
20 user_address varchar2(20) not null,
21 user_phone number(11) not null,
22constraint pk_users primary key(user_id)
23 );
24 comment on column users.user_id is'⽤户编号';
25 comment on column users.user_loginname is'⽤户登录名';
26 comment on column users.user_password is'⽤户登录密码';
27 comment on column users.user_username is'⽤户姓名';
28 comment on column users.user_address is'⽤户地址';
29 comment on column users.user_phone is'⽤户电话';
30--⽔表 water
31create table water(
32 water_id varchar2(10) not null,
汪东城和炎亚纶事件33 userid varchar2(10) not null,
34 water_count number(3,2) not null,
35 water_time date not null,
36 water_status number(1) not null,
37 water_priceid varchar2(10) not null,
38 water_beforecount number(3,2) not null,
39constraint pk_water primary key(water_id)
40 );
41 comment on column water.water_id is'⽔表编号';
42 comment on column water.userid is'⽤户编号';
43 comment on column water.water_count is'⽔表跑数';
44 comment on column water.water_time is'⽔表时间';
45 comment on column water.water_status is'⽔费缴费状态';
46 comment on column water.water_priceid is'⽔费价格编号';
47 comment on column water.water_beforecount is'上⽉⽔表跑数'; 48--⽔表 power
49create table power(
50 power_id varchar2(10) not null,
51 userid varchar2(10) not null,
52 power_count number(3,2) not null,
53 power_time date not null,
54 power_status number(1) not null,
55 power_priceid varchar2(10) not null,
56 power_beforecount number(3,2) not null,
57constraint pk_power primary key(power_id)
58 );
59 comment on column power.power_id is'电表编号';戚薇的个人资料
60 comment on column water.userid is'⽤户编号';
61 comment on column power.power_count is'电表跑数';
62 comment on column power.power_time is'电表时间';
63 comment on column power.power_status is'电费缴费状态';
64 comment on column power.power_priceid is'电费价格编号';
65 comment on column power.power_beforecount is'上⽉电表跑数'; 66--价格表 money
67create table price(
68 price_id varchar2(10) not null,
69 price_time date not null,
70 isactive number(1) not null,
71 waterprice number(2,2) not null,
72 powerprice number(2,2) not null,
73constraint pk_price primary key(price_id)
74 );点球是什么意思>奚梦瑶身高
75 comment on column price.price_id is'价格编号';
76 comment on column price.price_time is'价格⽇期';
77 comment on column price.isactive is'价格状态';
78 comment on column price.waterprice is'⽔费价格';
79 comment on column price.powerprice is'电费价格';
管理员表:
湖南省专科学校⽤户表:
⽔费表:
电费表:
价格表:
发布评论