17,377
社区成员
发帖
与我相关
我的任务
分享
select a2.cost-a1.cost, a2.area-a1.area
from A a1, A a2, B b
where a1.ID=b.NEWID and a2.ID=b.OLDID
select t1.id, t1.面积 - t2.面积, t1.金额 - t2.金额
from (select 表B.id, 面积, 金额 from 表B,表A where 表B.newid = 表A.id) t1,
(select 表B.id, 面积, 金额 from 表B,表A where 表B.oldid = 表A.id) t2
where t1.id = t2.id
select (select square from A where id = oldId) - (select square from A where id= newId) (OLD面积 - NEW面积), (select money from A where id = oldId) - (select money from A where id=newId) (用OLD金额 - NEW金额) from dual
select (select square from A where id = oldId) - (select square from A where id= newId) OLD面积 - NEW面积, (select money from A where id = oldId) - (select money from A where id=newId) 用OLD金额 - NEW金额 from dual