orcle plsql数据库语句 多表连接查询 降序了显示前五行

2025-03-22 18:52:43
推荐回答(3个)
回答1:

不是只加rownum就行的,建议这样写:

select *
  from (select *
           from info_type qi, info_message qw
          where qi.type_id = qw.type_id
            and qw.type_id = 1
          order by qw.create_date desc)
 where rownum <= 5

回答2:

不是有row_num<5这个方法的么

回答3:

用oracle特有的row_num