Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Creating never expiring DB user accounts in Oracle Oracle
  • cache buffer chain latch Oracle
  • cif crons Linux/Unix
  • 284785.1 How to check RAC Option is currently linked into the Oracle Binary Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • Settting up get_vmstat.sh for colletinf CPU Usage. Oracle
  • CPU Core related projections AWS
  • How To Limit The Access To The Database So That Only One User Per Schema Are Connected (One Concurrent User Per Schema) 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
  • find_pk.sql /* Find Primary Key */ Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle
  • load SPM baseline from cursor cache Oracle
  • S3 Basic info AWS

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

  • plan10g.sql good Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • eplan9i.sql Oracle
  • Jai Shree Ram Oracle
  • Important Script Method for tuning Oracle
  • useful dg links Oracle

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • 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
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • All About Trace Fils Oracle
  • How to calculate PROCESSES parameter Oracle
  • Implementing Listener Security Oracle
  • DBMS_STATS Metalinks Notes Oracle
  • fuser to check who is using diretory Linux/Unix
  • Small sample shell program Linux/Unix
  • SQL_PLAN.sql for checking real execution plan Oracle
  • Find average Row Length and other table size calculation. metalink notes Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme