P
Unregistered / Unconfirmed
GUEST, unregistred user!
我想使用表联结(UNION)建立一新记录“小计",方法如下:
SELECT DISTINCT P1,P2,P3,..
From Table1 Group by P1
Union
SELECT "","小计",SUM(P3)
FROM
(SELECT DISTINCT P1,P2,P3,..
From Table1 Group by P1)
一张表循环了两次,运行效率教低,各位大侠能否指点
一二,让我做的简单一点?
SELECT DISTINCT P1,P2,P3,..
From Table1 Group by P1
Union
SELECT "","小计",SUM(P3)
FROM
(SELECT DISTINCT P1,P2,P3,..
From Table1 Group by P1)
一张表循环了两次,运行效率教低,各位大侠能否指点
一二,让我做的简单一点?