--创建数据表
create table biz_data_chg
(
serno varchar2(32 byte) not null,
mod_type varchar2(2 byte),
loan_fee_no varchar2(32 byte),
loan_no varchar2(32 byte),
nper number(1),
fee_type char(2 byte),
charge_amt_old number(16,2),
charge_amt number(16,2),
chg_desc varchar2(2000 byte),
chg_status varchar2(2 byte),
input_id varchar2(10 byte),
input_br_id varchar2(20 byte),
cus_manager varchar2(10 byte),
main_br_id varchar2(20 byte),
last_mod_user varchar2(10 byte),
last_mod_time varchar2(20 byte),
constraint biz_data_chg primary key (serno)
);
comment on table biz_data_chg is '业务数据修改';
comment on column biz_data_chg.serno is '流水号';
comment on column biz_data_chg.mod_type is '修改类型';
comment on column biz_data_chg.loan_fee_no is '收费编号';
comment on column biz_data_chg.loan_no is '放款编号';
comment on column biz_data_chg.nper is '期数';
comment on column biz_data_chg.fee_type is '费用类型';
comment on column biz_data_chg.charge_amt_old is '修改前收费金额';
comment on column biz_data_chg.charge_amt is '收费金额';
comment on column biz_data_chg.chg_desc is '修改描述';
comment on column biz_data_chg.chg_status is '修改状态';
comment on column biz_data_chg.input_id is '登陆人';
comment on column biz_data_chg.input_br_id is '登陆机构';
comment on column biz_data_chg.cus_manager is '申请人';
comment on column biz_data_chg.main_br_id is '申请机构';
comment on column biz_data_chg.last_mod_user is '最后修改人';
comment on column biz_data_chg.last_mod_time is '最后修改时间';
--删除数据表
drop table users;
----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
范例二:
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
CREATE TABLE 'user'(
'id' int(11) not null auto_increment comment '用户表id',
'username' varchar(50) not null comment '用户名',
'password' varchar(50) not null comment '用户密码',
'email' varchar(50) default null comment '邮箱',
'phone' varchar(20) default null comment '电话',
'question' varchar(100) default null comment '找密码问题',
'answer' varchar(100) default null comment '找密码答案',
'role' int(4) not null comment '角色'
'create_time' datetime not null comment '创建时间',
'update_time' datetime not null comment '最后一次更新时间',
PRIMARY KEY('id'),
UNIQUE KEY 'user_name_unique' ('username') USING BTREE
)ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8