当前位置: 代码迷 >> Oracle管理 >> 求一语句,该怎么解决
  详细解决方案

求一语句,该怎么解决

热度:216   发布时间:2016-04-24 06:18:32.0
求一语句
SQL code
select * from f3002where ixkitl='CR02CB(2+2)DWKL'select litm from old02 where litm='CR02CB(2+2)DWKL'

这两个函数查询都有结果。但是下面的语句就不可以。为什么?

SQL code
select * from f3002where ixkitl =(select litm from old02 where litm='CR02CB(2+2)DWKL');


求正确语句

------解决方案--------------------
SQL code
select * from f3002where ixkitl in (select litm from old02 where litm='CR02CB(2+2)DWKL');
------解决方案--------------------
探讨
SQL code

select * from f3002
where ixkitl in (select litm from old02 where litm='CR02CB(2+2)DWKL');

------解决方案--------------------

子查询要用In,不要直接用那个等号,
select * from f3002
where ixkitl in (select litm from old02 where litm='CR02CB(2+2)DWKL');

仔细检查一下ixkitl与litm是不是对应的?
  相关解决方案