Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Derby TOP Clause

 
Shane Hill
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic