Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Finding Oracle Patches with opatch Oracle
  • Vivek Tuning for Row Locks. Oracle
  • Pending Distributed Transations Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • Sample WW22 listener.ora Oracle
  • Composite Index creation tip from Vivek Oracle
  • Find total file sizes Linux/Unix
  • column level grant syntax Oracle
  • ORACLE_SID in sqlplus Oracle
  • Load testing on Oracle 19C RAC with HammerDB Oracle
  • on IBM-AIX for display Linux/Unix
  • Oracle Statspack survival Guide Oracle
  • 284785.1 How to check RAC Option is currently linked into the Oracle Binary Oracle
  • Rename Oracle Instance Name Oracle
  • Settting up get_vmstat.sh for colletinf CPU Usage. Oracle

Order by with ROWNUM

Posted on 03-Jan-2007 By Admin No Comments on Order by with ROWNUM

18:02:01 PVM@AWRTEST:-> select * from pvm1;

NO

———

100

20

40

1

2

200

24

7 rows selected.

Elapsed: 00:00:00.01

18:02:17 PVM@AWRTEST:-> select no from ( select no, row_number() over (order by no desc) r from pvm1) where r=2;

NO

———

100

1 row selected.

Elapsed: 00:00:00.02

18:02:38 PVM@AWRTEST:-> select no from ( select no, row_number() over (order by no ) r from pvm1) where r=1;

NO

———

1

1 row selected.

Elapsed: 00:00:00.01

Oracle, SQL scripts

Post navigation

Previous Post: xargs use
Next Post: Sort with ASCII order and Numeric Order

Related Posts

  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • How to find password change date for user Oracle
  • useful dg links Oracle
  • Drop tempfiles from database Oracle
  • proc.sql Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Load SPM baseline from AWR Oracle
  • move_arch_files.ksh Linux/Unix
  • UNderstand and eliminate Latch contention. Oracle
  • sesswait.sql Oracle
  • setting prompt display with .profile Linux/Unix
  • 10g oem configuration Oracle
  • Export With Query Another Example. Oracle
  • Identical Dblink Issue… Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme