Tampilkan postingan dengan label oracle. Tampilkan semua postingan
Tampilkan postingan dengan label oracle. Tampilkan semua postingan

Oracle 10g Pagination Query SQL Example for Java Programmer

Kamis, 27 Februari 2014

Many time we need SQL query which return data page by page i.e. 30 or 40 records at a time, which can be specified as page size. In fact Database pagination is common requirement of Java web developers, especially dealing with largest data sets.  In this article we will see how to query Oracle 10g database for pagination or how to retrieve data using paging from Oracle. Many Java programmer also use display tag for paging in JSP which supports both internal and external paging. In case of internal paging all data is loaded in to memory in one shot and display tag handles pagination based upon page size but it only suitable for small data where you can afford those many objects in memory. If you have hundreds of row to display than its best to use external pagination by asking databaseto do pagination. In pagination, ordering is another important aspect which can not be missed. It’s virtually impossible to sort large collection in Java using Comparator or Comparablebecause of limited memory available to Java program, sorting data in database using ORDER BY clause itself is good solution while doing paging in web application.
Read more »
Read More..

What all new Oracle users should know about SQL Plus

Senin, 03 Februari 2014

Ok, I realize anyone who’s used oracle much will already know this, but I still get asked this question a lot. Usually its from people who know SQL, but havent worked a lot with Oracle.

If you are using SQL Plus with Oracle, you may be surprised by the odd way it displays results. This is because by default SQL Plus assumes your screen is only 80 characters wide, and 14 rows tall, and wraps accordingly.

You can fix this by entering the following in SQL Plus:
set pagesize 50000 
set linesize 32767

By default those values are 14 and 80 respectively. 32767 is the maximum size for linesize and 50000 is the maximum size for pagesize.
Read More..