NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

SQL Coomand, LIMIT is not accepted

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
anli



Joined: 19 Nov 2008
Posts: 67

PostPosted: Sun Nov 29, 2009 12:58 pm    Post subject: SQL Coomand, LIMIT is not accepted Reply with quote

It's for current trunk.

Running this command

Code:
SELECT *
FROM ...
LEFT JOIN ...
ON ...
WHERE ...
ORDER BY ...
LIMIT 20,10;


rises error

Code:
Error code 1064, SQL state 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 20 OFFSET 0' at line 7


Whithout LIMIT all do work. What have I missed? NB-supplied MySQL driver is in use. It seems NB inserts somewhere own 'LIMIT 20 OFFSET 0' to devide result set into pages. Where is that place to disable the division?
Back to top
elgarcho



Joined: 02 Mar 2010
Posts: 1

PostPosted: Tue Mar 02, 2010 5:33 pm    Post subject: Solution? Reply with quote

Do you have a solution about this issue? Tks.
Back to top
anli



Joined: 19 Nov 2008
Posts: 67

PostPosted: Tue Mar 02, 2010 6:17 pm    Post subject: Reply with quote

No, I have not.
Back to top
h2y1e0



Joined: 30 Jun 2010
Posts: 1

PostPosted: Wed Jun 30, 2010 10:41 am    Post subject: Reply with quote

I have had the same issue. A workaround would be to place the Limit part on the same line as last line. See the example.

Code:
SELECT *
FROM ...
LEFT JOIN ...
ON ...
WHERE ...
ORDER BY ...  LIMIT 20,10;


I hope this helps.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo