Mysql data to long´íÎóµÄ´¦Àí·½·¨
½ñÌìÔÚдʵϰÉúµÄÅàѵPPTʱ£¬ÓÃmysqlµÄcommand line client²åÈëÒ»Ìõ´øÖÐÎĵļǼʱ£¬±¨data to longµÄ´íÎó£¬
ÔÚÍøÉϲ鿴ÁËÏà¹Ø×ÊÁÏ£¬ËµµÄÊÇÒòΪÕâ¸öconsoleʹÓÃÁËÒ»ÖÖ±àÂ뷽ʽ£¬°ÑÃüÁî±àÂëºóÔÙ·¢Ë͵½Êý¾Ý¿â£¬¾ßÌåÇë²Î¿´http://www.cnblogs.com/ovliverlin/archive/2007/11/26/972549.html£¬ËµµÄ±È½ÏÏêϸ£¬±¾ÈË¿´Íêºó£¬Ö±½ÓÊäÈë
set names gbkÃüÁîÒ²°ÑÎÊÌâ½â¾öÁË¡£
Ïà¹ØÎĵµ£º
²éѯÊÇÊý¾Ý¿â¼¼ÊõÖÐ×î³£ÓõIJÙ×÷¡£²éѯ²Ù×÷µÄ¹ý³Ì±È½Ï¼òµ¥£¬Ê×ÏÈ´Ó¿Í»§¶Ë·¢³ö²éѯµÄSQLÓï¾ä£¬Êý¾Ý¿â·þÎñ¶ËÔÚ½ÓÊÕµ½ÓÉ¿Í»§¶Ë·¢À´µÄSQLÓï¾äºó£¬ Ö´ÐÐÕâÌõSQLÓï¾ä£¬È»ºó½«²éѯµ½µÄ½á¹û·µ»Ø¸ø¿Í»§¶Ë¡£ËäÈ»¹ý³ÌºÜ¼òµ¥£¬µ«²»Í¬µÄ²éѯ·½Ê½ºÍÊý¾Ý¿âÉèÖ㬶ԲéѯµÄÐÔÄܽ«»áÓкÜÔÚµÄÓ°Ïì¡£
Òò´Ë£¬±¾ÎľÍÔÚMySQLÖг£ÓõIJéѯÓÅ»¯¼¼Êõ½ ......
ÔÚwindowsÏ£º
´ò¿ªÃüÁîÐд°¿Ú£¬Í£Ö¹mysql·þÎñ(»òÕßÔÚÈÎÎñ¹ÜÀíÆ÷Àï½áÊøµômysqld-nt.exe½ø³Ì)£º Net stop mysql
Æô¶¯mysql£¬Ò»°ãµ½mysqlµÄ°²×°Â·¾¶£¬ÕÒµ½ mysqld-nt.exe
Ö´ÐУºmysqld-nt --skip-grant-tables
ÁíÍâ´ò¿ªÒ»¸öÃüÁîÐд°¿Ú£¬Ö´ÐÐmysql
use mysql
update us ......
ÏÂÃæÏÈÀ´¿´¿´Àý×Ó£º
table
id name
1 a
2 b
3 c
4 c
5 b
¿â½á¹¹´ó¸ÅÕâÑù£¬ÕâÖ»ÊÇÒ»¸ö¼òµ¥µÄÀý×Ó£¬Êµ¼ÊÇé¿ö»á¸´Ôӵöࡣ
±ÈÈçÎÒÏëÓÃÒ»ÌõÓï¾ä²éѯµÃµ½name²»Öظ´µÄËùÓÐÊý¾Ý£¬ÄǾͱØÐëʹÓÃdistinctÈ¥µô¶àÓàµÄÖظ´¼Ç¼ ......
mysql
> SHOW VARIABLES LIKE
'character_set_%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection |
latin1 |
| character_set ......