(select uppercode from A where ccode in (select uppercode from A))!=0
这条语句有问题哦,不能这样写的,写成这样试试。
select ccode,cName,uppercode from A t1
where uppercode!=0 and exists (select 1 from A t2 where t1.ccode=t2.ccode);
查询出来多于一个值,条件判断的话必须用单个值才行
select ccode,cName,uppercode from A
where uppercode!=0
and exists(select uppercode from A where ccode in (select uppercode from A) and uppercode!=0);
说的是(select uppercode from A where ccode in (select uppercode from A))!=0;这句
这句的子查询返回的uppercode有多个值