查询TB_XBE_ITEM表中temp1等于M和N的数据,分别前20行数据,并且根据ID排序
关键的词union连接
关键的词union连接
select * from tb_xbe_item where id in((select id from (select * from tb_xbe_item where temp1='M' order by id desc) where rownum<21) union (select id from (select * from tb_xbe_item where temp1='N' order by id desc) where rownum<21 ))