List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 30 2002 6:00pm
Subject:Re: LIMIT, ORDER Dilema
View as plain text  
At 11:32 -0800 3/30/02, destr0 wrote:
>Can you not have the LIMIT clause before the ORDER Clause in a select query?
>
>SELECT * FROM myTable LIMIT 30, 45 ORDER BY someField ASC;
>
>This query  ^ fails with the error:
>
>Error 1064: You have an error in your SQL syntax near ' ORDER BY someField
>ASC' at line 1
>
>I just want to make sure that the case is that you can't have your LIMIT
>clause before your order clause.

You can't.  And even if you could, the ORDER BY would be evaluated before
the LIMIT.

Thread
LIMIT, ORDER Dilemadestr030 Mar
  • Re: LIMIT, ORDER DilemaTyler Longren30 Mar
  • Re: LIMIT, ORDER DilemaPaul DuBois30 Mar
Re: LIMIT, ORDER Dilemadestr030 Mar
  • Re: LIMIT, ORDER DilemaPaul DuBois30 Mar
Re: LIMIT, ORDER Dilemadestr030 Mar
  • Re: LIMIT, ORDER DilemaPaul DuBois30 Mar
    • RE: LIMIT, ORDER DilemaRoger Baklund30 Mar
      • RE: LIMIT, ORDER DilemaPaul DuBois30 Mar
  • Calculate current age with given birthdaySon Nguyen30 Mar
    • RE: Calculate current age with given birthdayRoger Baklund30 Mar
      • RE: Calculate current age with given birthdayPaul DuBois30 Mar
        • RE: Calculate current age with given birthdayMichael Stassen30 Mar
Re: LIMIT, ORDER DilemaSteven Roussey30 Mar
RE: Calculate current age with given birthdayPaul DuBois31 Mar
  • RE: Calculate current age with given birthdayMichael Stassen2 Apr