BEGIN DECLARE startIndex int; select COUNT(*) INTO RecordCount from test; SET startIndex = (PageIndex - 1) * PageSize; SELECT * FROM test ORDER BY id DESC LIMIT startIndex,PageSize ; END
时间: 2024-10-13 12:59:39
BEGIN DECLARE startIndex int; select COUNT(*) INTO RecordCount from test; SET startIndex = (PageIndex - 1) * PageSize; SELECT * FROM test ORDER BY id DESC LIMIT startIndex,PageSize ; END