牛骨文教育服务平台(让学习变的简单)
博文笔记

mysql 两个查询结果 并 运算

创建时间:2016-09-23 投稿人: 浏览次数:2609

mysql 两个查询结果 并 运算

select column1 as one from a where id=1;
select column2 as two from b where id=1;

求 one two 运算

加法
select ( (select column1 as one from a where id=1)+(select column2 as two from b where id=1) );

声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。