Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Guide to Linux System Command Mastery Linux/Unix
  • tracksqltime.sql Oracle
  • PHP code to add WordPress posts in bulk programmatically PHP/MYSQL/Wordpress
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • tblwopk.sql tablewopk.sql Oracle
  • send email from unix mailx with attachment. Linux/Unix
  • Space padding in korn shell Linux/Unix
  • Handling LOB data in Oracle Oracle
  • Which environment is used by currently running process ( Very good) Linux/Unix
  • My Test Case On 21-OCT-2005 Oracle
  • Flowers Resize datafiles Oracle
  • Restoring a user’s original password 1051962.101 Oracle
  • Changing unix system clock when Oracle database is running. 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

  • Composite Index creation tip from Vivek Oracle
  • eplan.sql Oracle
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • find_longsql.sql Oracle
  • Handling LOB data in Oracle Oracle
  • Important Script Method for tuning Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Locktree.sql Oracle
  • Search and Replace vi editor command. Linux/Unix
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • create database syntax Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • Database link password in user_db_links Oracle
  • get_vmstat_linux Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme