日期:2014-05-16 浏览次数:20812 次
create table CkQD (Id int auto_increment not null, constraint Id_pr primary key(Id), Pn varchar(30), Gz varchar(20), Sl bigint, Jz decimal(10,2), Dw varchar(10), Ckt datetime, Jlr varchar(20), chr varchar(20), Bz varchar(100))
create table Ck (Id int auto_increment not null, constraint Id_pr primary key(Id), Pn varchar(30), Gz varchar(20), Sl bigint, Jz decimal(10,2), Dw varchar(10), Ckt datetime, Jlr varchar(20), chr varchar(20), Bz varchar(100))
insert into ck(ck.id(default),(select ckqd.Pn,ckqd.Gz,ckqd.Sl,ckqd.Jz,ckqd.Dw,ckqd.Ckt,ckqd.Jlr,ckqd.chr,ckqd.Bz from ckqd,rk where ckqd.Pn = rk.Pn and ckqd.Sl <= rk.Sl));