File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Derby TOP Clause Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Derby TOP Clause" Watch "Derby TOP Clause" New topic

Derby TOP Clause

Shane Hill

Joined: Nov 03, 2003
Posts: 10
Is there a TOP Clause for a Derby database query? I'm writing a query for my Java app and I'm using Apache Derby as the data source, but it doesn't seem to like the TOP clause that I'm using.

I use SQL Server quite a bit and that's where I'm getting that from. However, there are some minor differences between the two data stores. There may not be a TOP clause in Derby, but is there an equivalent way to do it?

Thanks for any help.

Masoud Kalali
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

Derby does not provide this sql command at least until version 10.1.x which i have used before.
but that time there was some ongoing discussion to provide this command in next versions.
you may check derby jira to see the state of this issue.

Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
I agree. Here's the link:
subject: Derby TOP Clause
It's not a secret anymore!