Ö»ÄÜʹÓ÷ǸºµÄÕûÊý 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;
String sqlCount="select count(*) from usertable where username='"+ userName+"'";Õâ¾ä»° ʲôÒâ˼°¡£¡ Õâ¾ä»°Êä³ö³öÀ´¾ÍÊÇ select count(*) from usertable where username='ÄãµÄ±äÁ¿ ......