aspose file tools
The moose likes JDBC and the fly likes to get 2nd row from table Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "to get 2nd row from table" Watch "to get 2nd row from table" New topic
Author

to get 2nd row from table

padmaratna kamble
Greenhorn

Joined: Apr 26, 2006
Posts: 26
hello friends
please tell me
how to select 2nd and 3rd row from any table
please give me query in detail
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56201
    
  13

"padmaratna",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
Originally posted by padmaratna:
hello friends
please tell me
how to select 2nd and 3rd row from any table
please give me query in detail


No such thing. The tables in a relational database represent an unordered set. You have to supply the ordering yourself. Once you supply the ordering, then you can get a particular row in that ordering.

On Oracle and some other databases, to get the 3rd row for some ordering, you could do something like:



Some people are confused because many databases will initially return rows to you in the order they were inserted; however, after some time (particularly after deletes, or updates that make VARCHAR values significantly bigger), the database will reuse or reorganize the internal storage and the "storage order" becomes more or less random.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: to get 2nd row from table
 
Similar Threads
JTable MultipleRoW Selection Problem
doubt in html
hyperlink
moving different rows with a mouse up and down
MultiComponent JTable