日期:2014-05-20 浏览次数:20702 次
SQL> select * from city where name in (); PROVINCE_NAME NAME POST_CODE EN_NAME NODE_ID ------------------------------ ------------------------------ --------- -----------------
------解决方案--------------------
SQL> select * from IFLOW_INTERTRY where id in (NULL);
ID GROUPID USERID PROCESSID DEPARTMENTID WRITERDATE TELEPHONE THEME TITLE ENCLOSURE DEPARTCANCEL DEPARTOPINION FUZONGNAME FUZONGSIGN RELATIVENAME RELATIVESIGN LEADNAME LEADEXAMINE OPERTIME ZONGBANMISHUID GONGSILINGDAOID
-------------------- ------- -------------------- --------
大哥,没报错,如果报错,把报错信息放上来
------解决方案--------------------
我记得in是不报错的,看你们吵的热烈,我又去MySQL中试了下:
Select * From A Where A.id in (Select B.sid From B Where B.id = 1)
A、B 两个表都是空表,没报错,正常执行。
楼主你说的出错,查询子句是自己用拼装字符串的方式去搞的?
------解决方案--------------------
SQL> select name from city where node_id='19'; NAME ------------------------------ SQL> select * from city where name in (select name from city where node_id='19'); PROVINCE_NAME NAME POST_CODE EN_NAME NODE_ID ------------------------------ ------------------------------ --------- -------------