有一个表,有N条数据,我想取最后几条(不确定)数据!顺序不变!公式是:LIMIT N-N%5,N%5 怎么不行啊!
------解决方案--------------------
- SQL code
CREATE PROCEDURE PROC_NAME(IN a INT, IN bINT)BEGIN DECLARE sql1VARCHAR(100); SET sql1 ="SELECT*FROM uw_player_skill LIMIT ?,?"; SET@fvar =a; SET@svar =b; SET@SQUERY =sql1; PREPARE STMTFROM @SQUERY; EXECUTE STMTUSING @fvar,@svar;END
------解决方案--------------------
------解决方案--------------------
一直再用2000