单行子查询返回多行

he1hehe he1hehe 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
今天这个sql语句报了一个单行子查询返回多行的错误

select t.*,
(select t_evolve_weekevolve
from t_mk_mission
where t_evolve_id = t.t_plan_id
and t_evolve_week = t.t_plan_week
and t_sys_flag <> -1) as weekevolve
from T_MK_PLAN t
where t.t_plan_submitflag <> 0
and t.t_plan_week = 4
and t.t_plan_deptid = 48000147100
and t.T_PLAN_YEAR = 2011
and t.t_sys_flag <> -1
order by t.t_plan_id desc

从网上查了一下,看到一个例子
select 名字,姓氏 from 雇员 where 薪金 = (select 薪金 from 雇员 where 部门标识 =20);
这个例子看懂了,但是上面那个是怎么回事?求高手指教。
...全文

相关推荐

评论 12
收藏 已收藏
分享
返回顶部
he1hehe
Oracle 高级技术 3,499 成员 18,710 内容