上述用的是sql2000 的语法。但都类似。
select tid, a.sum-b.sumfrom (select tid, sum(num) as sum from A order by tid)a,
(select tid, sum(num) as sum from B order by tid)b
where a.tid = b.tid
试一下上面的sql语句行不行
欢迎分享,转载请注明来源:内存溢出
上述用的是sql2000 的语法。但都类似。
select tid, a.sum-b.sumfrom (select tid, sum(num) as sum from A order by tid)a,
(select tid, sum(num) as sum from B order by tid)b
where a.tid = b.tid
试一下上面的sql语句行不行
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)