2017年夹芯板机转让的:用SQL如何写能把句查询结果为数字型的语句加在一起.

来源:百度文库 编辑:高校问答 时间:2024/05/08 11:48:16
select amount from subscriber
select amount1 from code
我想把amount和amout1加起来.怎么写.

SELECT subscriber.amount,code.amount1,SUM(subscriber.amount,code.amount1) AS amount0 FROM amount AS subscriber INNER JOIN amount1 AS code

select (select amount from subscriber)+(select amount1 from code) as theamount

subscriber和code表的其他字段是什么你没有具体说,但是感觉hongutay说的对