MySQL does not support variables with LIMIT in stored procedures

RustyRazorblade Consulting RustyRazorblade Consulting
1 min read

After banging my head against a wall for a while, I finally found this thread from June 2005 in the MySQL support forums regarding using variables in the LIMIT clause. They don’t support it yet. There’s no time table that indicates when it will be supported either. It’s very unfortunate, I was looking forward to benchmarking the difference between our ad hoc code and the stored proc version.

This code will not work: SELECT field from table LIMIT limit_var

After banging my head against a wall for a while, I finally found this thread from June 2005 in the MySQL support forums regarding using variables in the LIMIT clause. They don’t support it yet. There’s no time table that indicates when it will be supported either. It’s very unfortunate, I was looking forward to benchmarking the difference between our ad hoc code and the stored proc version.

This code will not work: SELECT field from table LIMIT limit_var

Very unfortunate.

RustyRazorblade Consulting

RustyRazorblade Consulting

Apache Cassandra Consultant and Distributed Systems Expert

Related Posts

Need Expert Help with Apache Cassandra?

Get professional consulting for your distributed systems challenges. Performance optimization, architecture design, and troubleshooting.