如何求出入库与出库的总数之差啊?
create table item(
no char(20) not null,
flag char(1) not null,
num int not null
)
--flag 为1时是入库,为2时是出库
insert into item values('01','1',200);
insert into item values('01','2',100);
insert into item values('02','1',100);
insert into item values('02','2',30);
如何求出入库与出库的总数之差啊?