1.查出多条数据只取第一条:select * from (select * from user) where rownum=1;
2.嵌套,子嵌套用到父sql的结果:
1 select a.id id, 2 (select b.name from B b where b.id = a.id and rownum = 1) name 3 from A a