示例
select ( (select column1 as one from a where id=1)+(select column2 as two from b where id=1) )
两个 select 结果做运算
该篇文章详细解释了一个SQL查询示例,展示了如何在SQL中通过嵌套子查询和表连接获取数据,分别从两个表(a和b)中选取column1和column2,针对id为1的记录进行计算。
该篇文章详细解释了一个SQL查询示例,展示了如何在SQL中通过嵌套子查询和表连接获取数据,分别从两个表(a和b)中选取column1和column2,针对id为1的记录进行计算。
示例
select ( (select column1 as one from a where id=1)+(select column2 as two from b where id=1) )
653

被折叠的 条评论
为什么被折叠?