mysql的存储过程

PREPARE s1 FROM 'SELECT * FROM gps_trace_vin_wk LIMIT ?,?';
set @_limit=0;
set @_limit1=(
select CASE when count(*) <100
then 100
END AS
parent_id_new FROM gps_trace_vin_wk);
EXECUTE s1 USING @_limit,@_limit1;

原文地址:https://www.cnblogs.com/wycBolg/p/12769175.html