Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

WindowsÏ»·¾³±äÁ¿Ð޸ģ¨Éæ¼°MySQLÃüÁîµÄÖ±½ÓÔËÐУ©


ÓÒ¼üÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿
¿ÉÒÔ¿´µ½ÓÐÓû§±äÁ¿ºÍϵͳ±äÁ¿
ÔÚÕâÀïÎÒÃÇ¿ÉÒÔ½øÐÐÐ޸Ļ·¾³±äÁ¿
±ÈÈç˵ÎÒÃÇ°²×°ÁËMySQL·þÎñÆ÷£¬Ïë½øÈëMySQLµÄÃüÁîÐеĻ°¾Í±ØÐëÔËÐÐcmd
Èç¹ûûÓÐÉèÖû·¾³±äÁ¿µÄ»°ÎÒÃDZØÐë½øÈëMySQLµÄ°²×°Â·¾¶²ÅÄÜʹÓÃmysql -u root -pÕâ¸öÃüÁî
ÕâÑù»á¸øÎÒÃÇ´øÀ´ºÜ¶àÂé·³£¬ÕâʱºòÎÒÃÇÏëÔõô²ÅÄÜ´ò¿ªcmdºóÖ±½ÓÔËÐÐmysql -u root -pÕâ¸öÃüÁî
ÎÒÃǵÄ×ö·¨ÊÇÔÚÓû§±äÁ¿µÄpath±äÁ¿ÖмÓÈëMySQLµÄ°²×°Â·¾¶£¬path±äÁ¿ÖÐÓкܶà±äÁ¿£¬ÐèҪʹÓ÷ֺŷָô
½Ó×ÅÉèÖÃÍê±Ïºó£¬Æô¶¯cmd£¬Ö±½ÓÊäÈëmysql -u root -pÎÒÃDZã¿É½øÈëMySQLµÄÃüÁîÐÐÁË


Ïà¹ØÎĵµ£º

MySQLÊý¾Ý¿âÉè¼ÆÔ­Ôò

ת×Ô http://www.supidea.com/post/mysql_design_database.aspx
MySQLÊý¾Ý¿âÉè¼ÆÔ­Ôò
MySQL¶ÔÓÚ³ÉΪһ¸ö·Ç³£¿ìËÙµÄÊý¾Ý¿â·þÎñÆ÷ÓÐ×ŵ±Ö®ÎÞÀ¢µÄÃûÉù£¬ËüÒ²·Ç³£ÈÝÒ×ÉèÖúÍʹÓá£Ëæ×ÅËü×÷ΪÍøÕ¾ºó¶ËÊý¾Ý¿âµÃÉùÍûÈÕÔö£¬ÆäЧ¹ûÔÚÈ¥Ä꿪ʼÓÐÃ÷ ÏÔÌá¸ß¡£µ«ÊǺܶàMySQLÓû§¸ü¶àµØÖªµÀÈçºÎ´´½¨Ò»¸öÊý¾Ý¿â²¢±àд¶ÔËüµÄ²éѯ¡£¾ÍÏñ³ÉÇ ......

MySQLÖÐgroup_concatº¯Êý


±¾ÎÄͨ¹ýʵÀý½éÉÜÁËMySQLÖеÄgroup_concatº¯ÊýµÄʹÓ÷½·¨£¬±ÈÈçselect group_concat(name) ¡£
MySQLÖÐgroup_concatº¯Êý
ÍêÕûµÄÓï·¨ÈçÏ£º
group_concat([DISTINCT] ÒªÁ¬½ÓµÄ×ֶΠ[Order BY ASC/DESC ÅÅÐò×Ö¶Î] [Separator '·Ö¸ô·û'])
»ù±¾²éѯ
mysql> select * from aa;
+------+------+
| id| name |
+----- ......

MysqlÎÊÌâ»ã×Ü

1£¬Mysql²åÈë¶þ½øÖÆ´ó¶ÔÏó³öÏÖÒì³££¬²åÈë¶þ½øÖƳöÏÖÒì³££¬Ôõô½â¾öcom.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
½â¾ö°ì·¨£ºurl=url=+"?useUnicode=true& ......

mysql distinct ¶Ô¶à×ֶιýÂ˲»ÕýÈ·µÄ½â¾ö·½·¨


ÏÂÃæÏÈÀ´¿´¿´Àý×Ó£º
    table
  id name
  1 a
  2 b
  3 c
  4 c
  5 b
¿â½á¹¹´ó¸ÅÕâÑù£¬ÕâÖ»ÊÇÒ»¸ö¼òµ¥µÄÀý×Ó£¬Êµ¼ÊÇé¿ö»á¸´Ôӵöࡣ
±ÈÈçÎÒÏëÓÃÒ»ÌõÓï¾ä²éѯµÃµ½name²»Öظ´µÄËùÓÐÊý¾Ý£¬ÄǾͱØÐëʹÓÃdistinctÈ¥µô¶àÓàµÄÖظ´¼Ç¼ ......

MYSQLÖÐEXPLAINµÄ˵Ã÷


 
mysql> explain select count(id) from t_prehandle_zhigao_05 as zhigao where start_time > '2008-05-30';
+----+-------------+--------+-------+---------------+------------+---------+------+---------+--------------------------+
| id | select_type | table  | type  | p ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ