update table 表2 set 數量=數量+10 where 產品編號=3 and 倉庫=1
1. select 产品名称 from 表1,表2 where 表2.商品编号=表2.商品编号 and 表2.仓库号=1 group by 表1.商品编号 having sum(表2.数量) !=02.delete from 表2 where 仓库号=2 and 數量=03 update 表2 set 數量=數量+10 from 表2 inner jion 表1 on 表1.商品编号=表2.商品编号 and 表1.产品类别='外设' and 表2.仓库号=1
where 數量=0
set 數量=10
where 產品編號=3
set 數量=數量+10
where 產品編號=3 and 倉庫=1
select 产品名称 from 表1,表2
where 表2.商品编号=表2.商品编号 and 表2.仓库号=1
group by 表1.商品编号
having sum(表2.数量) !=02.delete from 表2
where 仓库号=2 and 數量=03 update 表2 set 數量=數量+10 from 表2 inner jion 表1 on 表1.商品编号=表2.商品编号
and 表1.产品类别='外设' and 表2.仓库号=1