select * from tablea where tablea.id in (select tableb.id from tableb where rownum <=100 order by tableb.id desc ) ;
sql看上去没问题 另外你的rownum是字段还是什么 你把error贴出来让瞅一眼呗
语句对的,估计查询条件有问题
对于mysql,不能用rownum,得用limit
有需要可以参考
MySQL如何优化LIMIT http://www.data.5helpyou.com/article248.html