日期:2014-05-17  浏览次数:20846 次

关于查询的问题
select distinct EM_FLOORS_T.BUILDING_ID from EM_FLOORS_T ,EM_HOUSE_T where EM_FLOORS_T.FLOOR_ID = (select FLOOR_ID from em_house_t where HOUSE_ID=2291976 or HOUSE_ID=100342804 )

我要根据这两个条件查询 HOUSE_ID=100342804 , HOUSE_ID=100342804 查询 EM_FLOORS_T.BUILDING_ID

要它们在一个返回结果中 就是用一条语句查出来 怎么写? 请各位帮下···谢谢

------解决方案--------------------
select distinct EM_FLOORS_T.BUILDING_ID 
from EM_FLOORS_T ,EM_HOUSE_T 
where EM_FLOORS_T.FLOOR_ID = EM_HOUSE_T.FLOOR_ID
 and (EM_HOUSE_T.HOUSE_ID=2291976 or EM_HOUSE_T.HOUSE_ID=100342804);