User rownum to get only first 200 records : ROWNUM « Table « Oracle PL / SQL

Oracle PL / SQL
1. Aggregate Functions
2. Analytical Functions
3. Char Functions
4. Constraints
5. Conversion Functions
6. Cursor
7. Data Type
8. Date Timezone
9. Hierarchical Query
10. Index
11. Insert Delete Update
12. Large Objects
13. Numeric Math Functions
14. Object Oriented Database
15. PL SQL
16. Regular Expressions
17. Report Column Page
18. Result Set
19. Select Query
20. Sequence
21. SQL Plus
22. Stored Procedure Function
23. Subquery
24. System Packages
25. System Tables Views
26. Table
27. Table Joins
28. Trigger
29. User Previliege
30. View
31. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL / SQL » Table » ROWNUM 
User rownum to get only first 200 records



SQL>
SQL> select owner, table_name
  2        from all_tables
  3        where rownum < 200
  4        order by owner, table_name ;

OWNER                          TABLE_NAME
------------------------------ ------------------------------
OUTLN                          OL$
OUTLN                          OL$HINTS
OUTLN                          OL$NODES
SYS                            ACCESS$
SYS                            ARGUMENT$
SYS                            ASSOCIATION$
SYS                            ATTRCOL$
SYS                            ATTRIBUTE$
SYS                            AUDIT$
SYS                            BOOTSTRAP$
SYS                            CCOL$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            CDC_CHANGE_SETS$
SYS                            CDC_CHANGE_SOURCES$
SYS                            CDC_SYSTEM$
SYS                            CDEF$
SYS                            CLU$
SYS                            COL$
SYS                            COLLECTION$
SYS                            COLTYPE$
SYS                            COL_USAGE$
SYS                            COM$
SYS                            CON$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            CONTEXT$
SYS                            DEFROLE$
SYS                            DEFSUBPART$
SYS                            DEFSUBPARTLOB$
SYS                            DEPENDENCY$
SYS                            DIM$
SYS                            DIMATTR$
SYS                            DIMJOINKEY$
SYS                            DIMLEVEL$
SYS                            DIMLEVELKEY$
SYS                            DIR$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            DUAL
SYS                            DUC$
SYS                            ERROR$
SYS                            EXPACT$
SYS                            EXPDEPACT$
SYS                            EXPDEPOBJ$
SYS                            EXPPKGACT$
SYS                            EXPPKGOBJ$
SYS                            EXTERNAL_LOCATION$
SYS                            EXTERNAL_TAB$
SYS                            FET$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            FILE$
SYS                            HIER$
SYS                            HIERLEVEL$
SYS                            HISTGRM$
SYS                            HIST_HEAD$
SYS                            ICOL$
SYS                            ICOLDEP$
SYS                            IDL_CHAR$
SYS                            IDL_SB4$
SYS                            IDL_UB1$
SYS                            IDL_UB2$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            ID_GENS$
SYS                            INCEXP
SYS                            INCFIL
SYS                            INCVID
SYS                            IND$
SYS                            INDARRAYTYPE$
SYS                            INDCOMPART$
SYS                            INDOP$
SYS                            INDPART$
SYS                            INDPART_PARAM$
SYS                            INDSUBPART$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            INDTYPES$
SYS                            JAVAOBJ$
SYS                            JAVASNM$
SYS                            JOB$
SYS                            KOPM$
SYS                            LIBRARY$
SYS                            LINK$
SYS                            LOB$
SYS                            LOBCOMPPART$
SYS                            LOBFRAG$
SYS                            METAFILTER$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            METANAMETRANS$
SYS                            METAPATHMAP$
SYS                            METASCRIPT$
SYS                            METASCRIPTFILTER$
SYS                            METASTYLESHEET
SYS                            METAVIEW$
SYS                            METAXSL$
SYS                            METAXSLPARAM$
SYS                            METHOD$
SYS                            MIGRATE$
SYS                            MLOG$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            MLOG_REFCOL$
SYS                            MON_MODS$
SYS                            MON_MODS_ALL$
SYS                            NOEXP$
SYS                            NTAB$
SYS                            OBJ$
SYS                            OBJAUTH$
SYS                            OBJPRIV$
SYS                            OID$
SYS                            OPANCILLARY$
SYS                            OPARG$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            OPBINDING$
SYS                            OPERATOR$
SYS                            OPQTYPE$
SYS                            PARAMETER$
SYS                            PARTCOL$
SYS                            PARTLOB$
SYS                            PARTOBJ$
SYS                            PENDING_SESSIONS$
SYS                            PENDING_SUB_SESSIONS$
SYS                            PENDING_TRANS$
SYS                            PROCEDURE$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            PROCEDUREC$
SYS                            PROCEDUREINFO$
SYS                            PROCEDUREJAVA$
SYS                            PROCEDUREPLSQL$
SYS                            PROFILE$
SYS                            PROFNAME$
SYS                            PROPS$
SYS                            PROXY_DATA$
SYS                            PROXY_ROLE_DATA$
SYS                            REFCON$
SYS                            REG_SNAP$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            RESOURCE_COST$
SYS                            RESOURCE_MAP
SYS                            RESULT$
SYS                            RGCHILD$
SYS                            RGROUP$
SYS                            RLS$
SYS                            RLS_CTX$
SYS                            RLS_GRP$
SYS                            RLS_SC$
SYS                            RULESET$
SYS                            SECOBJ$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            SEG$
SYS                            SEQ$
SYS                            SETTINGS$
SYS                            SLOG$
SYS                            SNAP$
SYS                            SNAP_COLMAP$
SYS                            SNAP_LOADERTIME$
SYS                            SNAP_LOGDEP$
SYS                            SNAP_OBJCOL$
SYS                            SNAP_REFOP$
SYS                            SNAP_REFTIME$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            SNAP_SITE$
SYS                            SOURCE$
SYS                            SQL$
SYS                            SQL$TEXT
SYS                            SQLPROF$
SYS                            SQLPROF$ATTR
SYS                            SQLPROF$DESC
SYS                            SQL_VERSION$
SYS                            STMT_AUDIT_OPTION_MAP
SYS                            SUBCOLTYPE$
SYS                            SUBPARTCOL$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            SUM$
SYS                            SUMAGG$
SYS                            SUMDELTA$
SYS                            SUMDEP$
SYS                            SUMDETAIL$
SYS                            SUMINLINE$
SYS                            SUMJOIN$
SYS                            SUMKEY$
SYS                            SUMPARTLOG$
SYS                            SUMPRED$
SYS                            SUMQB$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            SUPEROBJ$
SYS                            SYN$
SYS                            SYSAUTH$
SYS                            SYSTEM_PRIVILEGE_MAP
SYS                            TAB$
SYS                            TABCOMPART$
SYS                            TABLE_PRIVILEGE_MAP
SYS                            TABPART$
SYS                            TABSUBPART$
SYS                            TRIGGER$
SYS                            TRIGGERCOL$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            TRIGGERJAVAC$
SYS                            TRIGGERJAVAF$
SYS                            TRIGGERJAVAM$
SYS                            TRIGGERJAVAS$
SYS                            TRUSTED_LIST$
SYS                            TS$
SYS                            TSQ$
SYS                            TYPE$
SYS                            TYPED_VIEW$
SYS                            TYPEHIERARCHY$
SYS                            TYPE_MISC$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            UET$
SYS                            UGROUP$
SYS                            UNDO$
SYS                            USER$
SYS                            USER_ASTATUS_MAP
SYS                            USER_HISTORY$
SYS                            USTATS$
SYS                            VIEW$
SYS                            VIEWCON$
SYS                            VIEWTRCOL$
SYS                            VTABLE$

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            _default_auditing_options_

199 rows selected.

SQL>
SQL>
SQL>
           
       
Related examples in the same category
1. Including the ROWNUM pseudo-column in the WHERE clause
2. Only list the first four rows using ROWNUM
3. The values for ROWNUM column are generated before the order by was applied
4. Select the Top 5
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.