安装mysql ;
mysql -u root-p登录;
create database db_database28;
use db_database28;
create table tb_gysinfo (id VARCHAR(32) PRIMARY KEY comment "供应商编号",name varchar(50) comment"供应商名称",jc varchar(20) comment"供应商简称",address varchar(100) comment"供应商地址",bianma varchar(10) comment"邮政编码",tel varchar(15) comment"电话", fax varchar(15) comment"传真",lian varchar(8) comment"联系人",itel varchar(15) comment"联系电话" ,yh varchar(50) comment"开户银行",mail varchar(30) comment"电子邮箱");
create table tb_spinfo (id varchar(32) primary key comment "商品编号",spname varchar(50) comment "商品名称",jc varchar(30) comment "商品简称" ,cd varchar(50) comment "产地",dw varchar(10) comment "商品计量单位",gg varchar(10) comment "商品规格",bz varchar(20) comment"包装",ph varchar(32) comment"批号",pzwh varchar(50) comment"批准文号",memo varchar(100) comment"备注",gysname varchar(50) comment"供应商名称");
create table tb_ruku_main (rkID varchar(32) primary key comment "入库编号",pzs FLOAT(8) comment "品种数量",je float(8) comment "总计金额" ,ysjl varchar(50) comment "验收结论",gysname varchar(100) comment "供应商名称",rkdate datetime(6) comment "入库时间",czy varchar(30) comment"操作员",jsr varchar(32) comment"经手人",jsfs varchar(10) comment"计算方式");
create table tb_ruku_detail (id varchar(50) primary key comment"流水号",rkID varchar(30) comment"入库编号",spid varchar(50) comment"商品编号", dj float(8) comment"单价",sl float(8) comment"数量");
create table tb_sell_main (sellID varchar(30) primary key comment"销售编号",pzs FLOAT8 comment"销售品种数",je float8 comment"总计金额", ysjl varchar(50) comment"验收结论",khname varchar(100) comment"客户名称",xsdate datetime(6) comment"销售日期",czy varchar(30) comment"操作员",jsr varchar(30) comment"经手人",jsfs varchar(10) comment"结算方式");
create table tb_sell_detail (id varchar(50) primary key comment"流水号",sellID varchar(30) comment"销售编号",spid varchar(50) comment"商品编号",dj float(8) comment"单价",sl float(8) comment"销售数量");