当前位置:Gxlcms > 数据库问题 > MySQL中limit使用动态参数的解决方法(拼接SQL字符串语句来执行SQL)

MySQL中limit使用动态参数的解决方法(拼接SQL字符串语句来执行SQL)

时间:2021-07-01 10:21:17 帮助过:131人阅读

@stmt = concat(select * from ,table_name, limit ?,?); prepare s1 from @stmt; set @s1 = page_begin; set @s2 = page_end; execute s1 using @s1,@s2; deallocate prepare s1;

 

参考:

http://blog.csdn.net/hellolongbin/article/details/1999817

http://blog.csdn.net/yongsheng0550/article/details/6217917

http://blog.csdn.net/xinyuan_java/article/details/50056741

MySQL中limit使用动态参数的解决方法(拼接SQL字符串语句来执行SQL)

标签:href   col   oca   tab   tar   ref   page   detail   一个   

人气教程排行