MysqlÖÐlimitµÄÓ÷¨Ïê½â
MysqlÖÐlimitµÄÓ÷¨£ºÔÚÎÒÃÇʹÓòéѯÓï¾äµÄʱºò£¬¾³£Òª·µ»ØÇ°¼¸Ìõ»òÕßÖмäij¼¸ÐÐÊý¾Ý£¬Õâ¸öʱºòÔõô°ìÄØ£¿²»Óõ£ÐÄ£¬mysqlÒѾΪÎÒÃÇÌṩÁËÕâÑùÒ»¸ö¹¦ÄÜ¡£
SELECT * from table LIMIT [offset,] rows | rows OFFSET offset
LIMIT ×Ó¾ä¿ÉÒÔ±»ÓÃÓÚÇ¿ÖÆ SELECT Óï¾ä·µ»ØÖ¸¶¨µÄ¼Ç¼Êý¡£LIMIT ½ÓÊÜÒ»¸ö»òÁ½¸öÊý×Ö²ÎÊý¡£²ÎÊý±ØÐëÊÇÒ»¸öÕûÊý³£Á¿¡£Èç¹û¸ø¶¨Á½¸ö²ÎÊý£¬µÚÒ»¸ö²ÎÊýÖ¸¶¨µÚÒ»¸ö·µ»Ø¼Ç¼ÐÐµÄÆ«ÒÆÁ¿£¬µÚ¶þ¸ö²ÎÊýÖ¸¶¨·µ»Ø¼Ç¼ÐеÄ×î´óÊýÄ¿¡£³õʼ¼Ç¼ÐÐµÄÆ«ÒÆÁ¿ÊÇ 0(¶ø²»ÊÇ 1)£º ΪÁËÓë PostgreSQL ¼æÈÝ£¬MySQL Ò²Ö§³Ö¾ä·¨£º LIMIT # OFFSET #¡£
mysql> SELECT * from table LIMIT 5,10; // ¼ìË÷¼Ç¼ÐÐ 6-15
//ΪÁ˼ìË÷´Óijһ¸öÆ«ÒÆÁ¿µ½¼Ç¼¼¯µÄ½áÊøËùÓеļǼÐУ¬¿ÉÒÔÖ¸¶¨µÚ¶þ¸ö²ÎÊýΪ -1£º
mysql> SELECT * from table LIMIT 95,-1; // ¼ìË÷¼Ç¼ÐÐ 96-last.
//Èç¹ûÖ»¸ø¶¨Ò»¸ö²ÎÊý£¬Ëü±íʾ·µ»Ø×î´óµÄ¼Ç¼ÐÐÊýÄ¿£º
mysql> SELECT * from table LIMIT 5; //¼ìË÷ǰ 5 ¸ö¼Ç¼ÐÐ
//»»¾ä»°Ëµ£¬LIMIT n µÈ¼ÛÓÚ LIMIT 0,n¡£
×¢Òâlimit 10ºÍlimit 9£¬1µÄ²»Í¬£º
ÀýÈ磺
1.
Select * from cyclopedia Where ID>=(
Select Max(ID) from (
Select ID from cyclopedia Order By ID limit 90001
) As tmp
) limit 100;
2.
Select * from cyclopedia Where ID>=(
Select Max(ID) from (
Select ID from cyclopedia Order By ID limit 90000,1
) As tmp
) limit 100;
ͬÑùÊÇÈ¡90000Ìõºó100Ìõ¼Ç¼,µÚ1¾ä¿ì»¹ÊǵÚ2¾ä¿ì?
µÚ1¾äÊÇÏÈÈ¡ÁËǰ90001Ìõ¼Ç¼,È¡ÆäÖÐ×î´óÒ»¸öIDÖµ×÷ΪÆðʼ±êʶ,È»ºóÀûÓÃËü¿ÉÒÔ¿ìËÙ¶¨Î»ÏÂ100Ìõ¼Ç¼
µÚ2¾äÔñÊǽö½öÈ¡90000Ìõ¼Ç¼ºó1Ìõ,È»ºóÈ¡IDÖµ×÷Æðʼ±êʶ¶¨Î»ÏÂ100Ìõ¼Ç¼
µÚ1¾äÖ´Ðнá¹û.100 rows in set (0.23) sec
µÚ2¾äÖ´Ðнá¹û.100 rows in set (0.19) sec
ÆäʵµÚ2¾äÍêÈ«¿ÉÒÔ¼ò»¯³É£º
Select * from cyclopedia Where ID>=(
Select ID from cyclopedia limit 90000,1
)limit 100;
Ö±½ÓÀûÓõÚ90000Ìõ¼Ç¼µÄID,²»Óþ¹ýMaxÔËËã,ÕâÑù×öÀíÂÛÉÏЧÂÊÒò¸Ã¸ßһЩ,µ«ÔÚʵ¼ÊʹÓÃÖм¸ºõ¿´²»µ½Ð§¹û,ÒòΪ±¾Éí¶¨Î»ID·µ»ØµÄ¾ÍÊÇ1Ìõ¼Ç¼,Max¼¸ºõ²»ÓÃÔË×÷¾ÍÄܵõ½½á¹û,µ«ÕâÑùд¸üÇåäÀÃ÷ÀÊ,ʡȥÁË»ÉßÄÇÒ»×ã.
Select Top 100 * from cyclopedia Where ID>=(
Select Top 90001 Max(ID) from (
Select ID from cyclopedia Order By ID
) As tmp
)
µ«²»¹ÜÊÇʵÏÖ·½
Ïà¹ØÎĵµ£º
MySQLË÷Òý¼ò½é... 1
Ò»¡¢Ë÷Òý·Öµ¥ÁÐË÷ÒýºÍ×éºÏË÷Òý…………………………………………………………………………………&hel ......
ÔÚѧϰ£¼Linux³ÌÐòÉè¼Æ£¾µÚ8ÕÂMySQLÊý¾Ý¿â8.3½Ú£º
ʹÓÃCÓïÑÔ·ÃÎÊMySQL·ÃÎÊÊý¾Ý¿âʱ³¢ÊÔ°ÑSQLÊý¾Ý»»³ÉÁËÖÐÎÄ£¬µ«ÊÇÔÚÔËÐÐʾÀý³ÌÐòʱÖÕ¶ËÊä³öÈ´ÂÒÂ룬MySQL C ÓïÑÔÁ¬½ÓĬÈÏ×Ö·û¼¯ÊÇlatin1
²éÁËÏÂAPIÕÒµ½ÈçϺ¯Êý¿É½â¾öÖÐÎÄÂÒÂëÎÊÌâ¡£
int
mysql_set_character_set(
MYSQL *
mysql,
char
*
csname)
ÃèÊö
¸Ãº¯ÊýÓ ......
phpmyadmin2.11.92 --APMSEVR5.2.6
д´æ´¢¹ý³ÌʱÌáʾerror 1307 (HY000):Failed to create procedure...
-----------------------------------------------------------------------
½«phpmyadminÖеÄmysqlÊý¾Ý¿âÖеıíprocɾ³ý
Ö´ÐÐÒÔÏ´úÂëÖØ½¨¸Ã±í
-------------------------------------------------------------- ......
½éÉÜ£º
mysql sha1
a¡£ 1 -- 11λ Êý×Ö
b¡£ 1 -- 8λ Сд×Öĸ
c¡£ 1 -- 8λ Сд×Öĸ + Êý×Ö
d¡£ 1 -- 7λ ×Öĸ + Êý×Ö + ·ûºÅ
e¡£ 1 -- 8λ´óд×Öĸ
»¹ÔÚ¼ÌÐøÉú³ÉÖÐ,ÕæÅå·þÄÌÍ·Õ⺢×ÓŪÁ˺ü¸¸öÔÂÁË¡£
ÏÂÔØµØÖ·
http://down.5luyu.cn ......
ÓÃADO²Ù×÷MYSQLÊý¾Ý¿â VBEÖÐÇëÈ·¶¨ÒýÓà microsoft activeX data objects xx ¿âÁ¬½Ó¼°¸üÐÂMYSQLÊý¾Ý¿âÊý¾Ý
´úÂëÈçÏÂ: Sub updt() Dim strconnt As String strconnt = "" Set connt = New ADODB.Connection Dim sevip, Db, user, pwd As String 'Éè·þÎñÆ÷µØÖ·¡¢ËùÁ¬Êý¾Ý£¬¼°µÇ¼Óû§ÃÜÂë sevip = "localhost" '"192.168.*.* ......