Mysql存储过程中分页

 #分页每页取指定条数记录
        set @qq=concat('insert into tmp_tcicrm_oms_shipment(shipment_tid) select shipment_tid from tcicrm_oms_shipment_header
        where shipment_status = \'SHIPMENT_WAIT_CREATE\'limit ',@startLimit,@endLimit) ;
        PREPARE qq from @qq;
        EXECUTE qq;

参数@startLimit指的是从第几天开始,@endLimit指的是取多少条记录

posted @ 2012-12-27 17:21  ellens  阅读(136)  评论(0)    收藏  举报