File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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
Bookmark "Derby TOP Clause" Watch "Derby TOP Clause" New topic
Author

Derby TOP Clause

Shane Hill
Greenhorn

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.
Example:
SELECT TOP 10 * FROM Orders

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.

Shane
Masoud Kalali
Author
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
 
wood burning stoves
 
subject: Derby TOP Clause
 
Similar Threads
Converting LONGVARBINARY of HSQL to BLOB of Derby
Error loading derby driver
Java Interview Questions
Stripping duplicate data from a join query
JPA 2: In a query, how to compare the size of lists?