日期:2014-05-17 浏览次数:20494 次
SELECT U.[StoreNum]-I.[DetailNum]
FROM
(SELECT SUM(StoreNum) AS StoreNum FROM TEST1) AS U,
(SELECT SUM(DetailNum) AS DetailNum FROM TEST2) AS I
SELECT isnull(U.[StoreNum],0) - isnull(I.[DetailNum] ,0)
FROM
(SELECT SUM(StoreNum) AS StoreNum FROM TEST1) AS U,
(SELECT SUM(DetailNum) AS DetailNum FROM TEST2) AS I