Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Find all users who have DML privileges Oracle
  • Jai Shree Ram Linux/Unix
  • normal maintenance for exp-imp and renaming table Oracle
  • Oracle Standby Database Library Index from Metalink Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • Good notes for shared pool Oracle
  • Insert cause enqueue locks Oracle
  • get_vmstat.ksh Linux/Unix
  • chk_space_SID.ksh Linux/Unix
  • Temporary tablespace explaination Oracle
  • How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep) Oracle
  • Jai Shree Ram Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • note id 373303.1 Linux/Unix

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

  • PLSQL Table Syntax 1 Oracle
  • Oracle Metalink useful notes Oracle
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • To find explain plan for a statement that occurred in past. Oracle
  • Sample WW22 listener.ora Oracle
  • Committing distributed transaction using commit force 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • Facts about SCN and Rollback Segment Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle
  • How to stop OCSSD Daemon Oracle
  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix
  • _B_TREE_BITMAP_PLANS issue during 8.1.7 to 9.2.0.8 upgrade Oracle
  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • Rename Tablespace Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme