ÀûÓÃMySQLµÄÒ»¸öÌØÐÔʵÏÖMySQL²éѯ½á¹ûµÄ·ÖÒ³ÏÔʾ
ÔÚmysqlÖÐÀûÓÃselectÓï¾äµÄÒ»¸öÌØÐԾͿÉÒԺܷ½±ãµØʵÏÖ²éѯ½á¹ûµÄ·ÖÒ³£¬selectÓï¾äµÄÓï·¨£º
SELECT [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [HIGH_PRIORITY]
[DISTINCT | DISTINCTROW | ALL]
select_expression,...
[INTO OUTFILE 'file_name' export_options]
[from table_references
[WHERE where_definition]
[GROUP BY col_name,...]
[HAVING where_definition]
[ORDER BY {unsigned_integer | col_name | formula} [ASC | DESC] ,...]
[LIMIT [offset,] rows]
[PROCEDURE procedure_name] ]
LIMIT×Ó¾ä¿ÉÒÔÓÃÀ´ÏÞÖÆÓÉSELECTÓï¾ä·µ»Ø¹ýÀ´µÄÊý¾ÝÊýÁ¿£¬ËüÓÐÒ»¸ö»òÁ½¸ö²ÎÊý£¬Èç¹û¸ø³öÁ½¸ö²ÎÊý£¬
µÚÒ»¸ö²ÎÊýÖ¸¶¨·µ»ØµÄµÚÒ»ÐÐÔÚËùÓÐÊý¾ÝÖеÄλÖ㬴Ó0¿ªÊ¼£¨×¢Òâ²»ÊÇ1£©£¬µÚ¶þ¸ö²ÎÊýÖ¸¶¨×î¶à·µ»ØÐÐ
Êý¡£ÀýÈ磺
select * from table LIMIT 5,10; #·µ»ØµÚ6-15ÐÐÊý¾Ý
select * from table LIMIT 5; #·µ»ØÇ°5ÐÐ
select * from table LIMIT 0,5; #·µ»ØÇ°5ÐÐ
Ïà¹ØÎĵµ£º
½ñÌìÎÒÃÇ¿´¿´¹ØÓÚMySQLÂýÈÕÖ¾µÄÔĶÁ¡£
ÎÒÃÇÖªµÀ£¬Èç¹ûÎÒÃǵÄÓï¾ä²»¹»ÓÅ»¯£¬ÄÇôÊ×ÏÈMySQLµÄÂýÈÕÖ¾ÊǽøÒ»²½ÓÅ»¯µÄÀëÏßÖ¤¾Ý£¬ËäÈ»ÀïÃæÓкÃ
¶à“αÂýÓï¾ä”£¡
ÏȲ»ËµÔõôÓÅ»¯£¬Èç¹ûÄãµÄÈÕÖ¾ÓÐÒ»ÌõÓï¾ä¶ÄסÁË£¬ÄÇô»áÓв»¼ÆÆäÊýµÄÂýÓï¾äÌî³äµ½MySQLµÄÂúÈÕÖ¾ÀïÃæ¡£ÄÇôÊ×ÏÈÌáÁ¶³öÕâЩÓï
¾ä¾Í·Ç³£Í·ÌÛ¡£
½ñÌìÖ÷Òª½ ......
½ñÌìÖÕÓÚÕÒµ½×Ô¼ºµ÷ÊÔÉÐѧÌÃshoppingÏîĿʱµÄÎÊÌâËùÔÚÁË£¬Í¨¹ý²é×ÊÁÏ£¬¶ÔmyeclipseºÍtomcatµÄ²¿ÊðÓÖÓÐÁ˸üÉîÒ»¸ö²ã´ÎµÄÁ˽⣬³ÌÐòµ÷ͨÁË£¬ÐË·ÜÁËÒ»ÏÂÏ£¬¹þ¹þ¡£¡£
È¥ºǫ́Ìí¼ÓÊý¾Ý·¢ÏÖ´ÓmysqlÖжÁ³öµÄÖÐÎÄÈ«²¿ÏÖʵΪ¿É°®µÄÎʺţ¬ÕâϺÃÁË£¬ÎÒÐÄÀïÒ²²úÉúÎʺŠ......
MySQL Administrator ÊÇʲôÈí¼þ£¿
MySQL Administrator ÊÇÒ»¸öרÃÅÓÃÓÚ¹ÜÀí My SQL 4.X ºÍ 5.X My SQLÊý¾Ý¿âµÄÈí¼þ£¬¿ÉÒÔʹÓÃÕâ¸öÈí¼þ±¸·ÝMy SQLÊý¾Ý¿â£¬»¹ÔMy SQLÊý¾Ý¿â¡£
×¢£ºÈç¹ûÄãµÄÊý¾Ý¿âÊÇ MS SQL 2000 Êý¾Ý¿â£¬Çë²Î¿¼ÕâÀʹÓà MS SQL 2000 ÆóÒµ¹ÜÀíÆ÷¹ÜÀí
ÏÂÔØ MySQL Administrator Èí¼þ
http://61.139.76 ......
MySQLµÄ×Ö·û¼¯ÎÊÌâ¡£WindowsÏ¿Éͨ¹ýÐÞ¸Ämy.iniÄÚµÄ
CODE:
# CLIENT SECTION
[mysql]
default-character-set=utf8
#
SERVER SECTION
[mysqld]
default-character-set=utf8
Õâ
Á½¸ö×Ö¶ÎÀ´¸ü¸ÄÊý¾Ý¿â
µÄ
ĬÈÏ×Ö·û¼¯¡£µÚÒ»¸öÊÇ¿Í»§¶ËĬÈϵÄ×Ö·û¼¯£¬µÚ¶þ¸öÊÇ·þÎñÆ÷¶ËĬÈϵÄ×Ö·û¼¯¡£¼ÙÉèÎÒÃÇ°ÑÁ½¸ö¶¼ÉèΪutf8£¬È»ºó ......
ÎÒÓõÄÊÇmysql5.0£¬
ÎÒ³ÌÐòÖÐÓõ½ÁËÒ»¾äsqlÊÇ
SQL code
select count(DISTINCT id) from Policyinfo p where p.filename not in
(select p2.filename from Policyreadinfo p2 where p2.reader='test')
µ«ÊÇÿ´ÎÔÚ³ÌÐòÖÐÿ´ÎÖ´ÐÐÕâ¾äsqlʱÍøÒ³¾ÍÌØÂý£¬Òª10¶àÃ룬¶øÕâ2¸ö±íµÄ¼Ç¼ÐÐÊýÒ²¾Í1000¶à¶øÒÑ£¬ÎÒ°ÑÕâ¾äsqlµ¥¶ÀÄ ......