Ö»ÄÜʹÓ÷ǸºµÄÕûÊý The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be non-negative integer constants (except when using prepared statements). ÄÇÔõô»ñÈ¡µÚ5ÌõºÍºó±ßµÄËùÓÐÊý¾ÝÄØ£¿ лл
µÚ5Ìõ: SELECT * from table LIMIT 4,1 ºó±ßµÄËùÓÐÊý¾ÝÄØ SELECT * from table LIMIT 4,100000
SQL code:
select count(*) into @cnt from table; select * from table where 1 limit 4,@cnt;
CREATE DATABASE ADDRESSLIST; USE ADDRESSLIST; DROP TABLE IF EXISTS FRIEND; CREATE TABLE FRIEND (FRIEND_ID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY , FRIEND_NAME VARCHAR(20) NOT N ......