首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

如何select 直接只取 两数相减的结果

2013-10-19 
怎么select 直接只取 两数相减的结果(select num from t1 where...) - (select num from t2 where...)这个

怎么select 直接只取 两数相减的结果
(select num from t1 where...) - (select num from t2 where...)
这个只能取出结果的
但是select的时候我该怎么写呢? 又必须写个from的嘛
[解决办法]
没明白楼主啥意思
select col from(
(select num from t1 where...) - (select num from t2 where...)col
)
[解决办法]
select 

(select num from t1 where...) - (select num from t2 where...) a

from dual

热点排行
Bad Request.