首页 > 代码库 > Oracle建表脚本记录
Oracle建表脚本记录
--删除 drop table dianfei; --创建表 create table dianfei ( uon varchar2(10) not null, mmonth varchar2(6) not null, ddf number(6,2) not null, djftime date not null, djfzt varchar2(3) not null, dsyjf date not null ); --注释 comment on table dianfei is ‘电表‘; comment on column dianfei.uon is ‘用户编号(从键)‘; comment on column dianfei.mmonth is ‘缴费月份(从键)‘; comment on column dianfei.ddf is ‘电费金额‘; comment on column dianfei.djftime is ‘缴费日期‘; comment on column dianfei.djfzt is ‘缴费状态‘; comment on column dianfei.dsyjf is ‘上月缴费日期‘; --创建主键,从键 alter table dianfei add constraint pk_dianfei foreign key (uon) references uuser (uon); alter table dianfei add constraint pk_dianfeia foreign key (mmonth) references money (mmonth);
Oracle建表脚本记录
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。