从数据库中取出产品数量和产品ID,怎么能通过一条语句把数据更新到库存表。进入看详细。。。 select a.id,a.num-b.numfrom 库存表 afrom 销售表 b on a.id=b.id 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select a.id,a.num-b.numfrom 库存表 a ,销售表 b where a.id=b.id 如要更新到库存表,写个tigger吧 限制库存数量>0如下:select a.id,a.num-b.numfrom 库存表 afrom 销售表 b on a.id=b.idand a.num-b.num>0 上面的贴错了,应该是select a.id,a.num-b.numfrom 库存表 a ,销售表 b where a.id=b.id and a.num-b.num>0 学习 SQL Server----------------------------------------------------- 如何删除指定列内容的最后括号内的文字 计算日期 sql查询数据生成excel 非常奇怪的问题 我是用邹建写的那个SQL导成EXCEL的程序 为什么我存储过程里执行的作业每次只能执行一次? excel导入sql 如何用游标插入 菜鸟问 开发一个工程项目用的数据库最好用什么? SQL2008分组统计问题 简体 sql server2000 能装在繁体的win200 server 上吗? 有谁知道两个不同的数据库(在不同机器上)里的表能建立相互关联吗?
from 库存表 a ,销售表 b where a.id=b.id
select a.id,a.num-b.num
from 库存表 a
from 销售表 b on a.id=b.id
and a.num-b.num>0
select a.id,a.num-b.num
from 库存表 a ,销售表 b
where a.id=b.id
and a.num-b.num>0