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

MySQL 4.1(»òÒÔÉÏ) ÖÐÎÄÂÒÂëÔ­Òò¼°½â¾ö·½·¨

ºÜ¶àÅóÓѶ¼ÓйýÕâÑùµÄ¾­Àú,½«mysqlÉý¼¶µ½4.1(»òÒÔÉÏ)°æ±¾ºó,¾ÉµÄ³ÌÐò´ÓÊý¾Ý¿â¶Á³öÀ´µÄ¶¼±ä³ÉÂÒÂëÁË.Õâ¸öÎÊÌâÍøÉϺܶàÕâ·½ÃæµÄÌÖÂÛ,ÆäʵÊÖ²áÉÏÒѾ­ÓйØÓÚÕâ·½ÃæµÄÏêϸ˵Ã÷,
ÒÔÏÂÄÚÈÝÕª×ÔmysqlÊÖ²á,
²úÉúÕâ¸öÎÊÌâµÄÔ­ÒòÊÇ:
MySQL 4.1.x¿ªÊ¼Ö§³ÖÒÔÏÂÕâЩÊÂÇé
·         ʹÓöàÖÖ×Ö·û¼¯(Character Set)À´´æ´¢×Ö·û´®
·         ʹÓöàÖÖУ¶Ô¹æÔò(Collation)À´±È½Ï×Ö·û´®
·         ÔÚͬһ̨·þÎñÆ÷¡¢Í¬Ò»¸öÊý¾Ý¿â»òÉõÖÁÔÚͬһ¸ö±íÖÐʹÓò»Í¬×Ö·û¼¯»òУ¶Ô¹æÔòÀ´»ìºÏ×Ö·û´®
·         ÔÊÐí¶¨ÒåÈκ춱ðµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò
×Ö·û¼¯(Character Set)ºÍУ¶Ô¹æÔò(Collation)ÓÐ4¸ö¼¶±ðµÄĬÈÏÉèÖ㺷þÎñÆ÷¼¶¡¢Êý¾Ý¿â¼¶¡¢±í¼¶ºÍÁ¬½Ó¼¶¡£ÒÔÏÂÃèÊö¿ÉÄÜÏԵø´ÔÓ£¬µ«ÊÇÔÚʵ¼ÊÓ¦ÓÃÖпÉÒÔ·¢ÏÖʹÓöàÖÖ¼¶±ð»áʹ½á¹û×ÔÈ»¶øÃ÷ÏÔ¡£
ÔõôÑù½â¾öÕâ¸öÎÊÌâÄØ?ÏÂÃæÎÒÃǾÍÀ´ÌÖÂÛÒ»ÏÂÓÐÄÄЩ·½·¨:
1.Á¬½Ó¼¶
һЩ×Ö·û¼¯ºÍУ¶Ô¹æÔòϵͳ±äÁ¿Óë¿Í»§¶ËºÍ·þÎñÆ÷µÄ½»»¥Óйء£ÔÚÇ°ÃæµÄÕ½ÚÖÐÒѾ­Ìáµ½¹ý²¿·ÖÄÚÈÝ£º
·         ·þÎñÆ÷×Ö·û¼¯ºÍУ¶Ô¹æÔò¿ÉÒÔÓÃ×÷character_set_serverºÍcollation_server±äÁ¿µÄÖµ¡£
·         ĬÈÏÊý¾Ý¿âµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò¿ÉÒÔÓÃ×÷character_set_databaseºÍcollation_database±äÁ¿µÄÖµ¡£
ÔÚ¿Í»§¶ËºÍ·þÎñÆ÷µÄÁ¬½Ó´¦ÀíÖÐÒ²Éæ¼°ÁË×Ö·û¼¯ºÍУ¶Ô¹æÔò±äÁ¿¡£Ã¿Ò»¸ö¿Í»§¶ËÓÐÒ»¸öÁ¬½ÓÏà¹ØµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò±äÁ¿¡£
¿¼ÂÇʲôÊÇÒ»¸ö“Á¬½Ó”£ºËüÊÇÁ¬½Ó·þÎñÆ÷ʱËù×÷µÄÊÂÇé¡£¿Í»§¶Ë·¢ËÍSQLÓï¾ä£¬ÀýÈç²éѯ£¬Í¨¹ýÁ¬½Ó·¢Ë͵½·þÎñÆ÷¡£·þÎñÆ÷ͨ¹ýÁ¬½Ó·¢ËÍÏìÓ¦¸ø¿Í»§¶Ë£¬ÀýÈç½á¹û¼¯¡£¶ÔÓÚ¿Í»§¶ËÁ¬½Ó£¬ÕâÑù»áµ¼ÖÂһЩ¹ØÓÚÁ¬½ÓµÄ×Ö·û¼¯ºÍ У¶Ô¹æÔòµÄÎÊÌ⣬ÕâЩÎÊÌâ¾ùÄܹ»Í¨¹ýϵͳ±äÁ¿À´½â¾ö£º
·         µ±²éѯÀ뿪¿Í»§¶Ëºó£¬ÔÚ²éѯÖÐʹÓÃÄÄÖÖ×Ö·û¼¯£¿
·þÎñÆ÷ʹÓÃcharacter_set_client±äÁ¿×÷Ϊ¿Í»§¶Ë·¢Ë͵IJéѯÖÐʹÓõÄ×Ö·û¼¯¡£
·         ·þÎñÆ÷½ÓÊÕµ½²éѯºóÓ¦¸Ãת»»ÎªÄÄÖÖ×Ö·û¼¯£¿
ת»»Ê±£¬·þÎñÆ÷ʹÓÃcharacter_set_connectionºÍcollation_connectionϵͳ


Ïà¹ØÎĵµ£º

Çë×¢ÒâMYSQLÓï¾äÖеÄÒýºÅ

SQL #1: select * from uchome_feed where uid in('0',501...) order by dateline desc limit 0,50;
SQL #2: select * from uchome_feed where uid in(0,501...) order by dateline desc limit 0,50;
SQL #1  ÊÇCSDN ¸öÈË¿Õ¼ä»ñÈ¡¸öÈ˶¯Ì¬µÄSQL£¬ÊôUCHÔ­°æSQL¡£
SQL #2 ÊÇÈ¥µôµ¥ÒýºÅ(SQL #1ÖкìÉ«²¿·Ö)ºóµÄSQL£¬Á½¸ ......

mysql´æÖü¹ý³Ì

## **********first test,procedure**********
#<1>
use testprocedure;
delimiter //
create procedure simpleproce1 (out par1 int)
begin
 select count(*) into par1 from proce;
end
//
delimiter ;
call simpleproce1(@a);
select @a;
#<2>,ÿ´ÎÖ»Óе¥Ò»µÄÐпÉÒÔ±»È¡»Øselect id,name i ......

MysqlµÄvarcharÀàÐÍ

×Ô´ÓÈÏʶmysqlµÄÄÇÌìÆð¾ÍÖªµÀvarcharµÄ³¤¶ÈÏÞÖÆΪ255£¬²»¹ýÏÖÔÚÕâÖÖÇé¿öÒѾ­¸Ä±äÁË£º
Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 by ......

MySql °´Ê±¼ä¶Î²éѯÊý¾Ý·½·¨


¸ñʽΪ2008-06-16
²éѯ³öµ±ÌìÊý¾Ý£º
SELECT * from `table` WHERE date(ʱ¼ä×Ö¶Î) = curdate();
²éѯ³öµ±ÔÂ×ֶΣº
SELECT *
from `table`
WHERE month( ʱ¼ä×Ö¶Î) = month( now( ) ) ;
ʱ¼ä¸ñʽΪ1219876…… UNIXʱ¼ä£¬Ö»ÒªÓ¦ÓÓfrom_UNIXTIME( )”º¯Êý
ÀýÈç²éѯµ±Ô£º
SELECT ......

MySQL³£ÓòÙ×÷»ù±¾²Ù×÷


¹Ø¼ü×Ö: mysql³£ÓòÙ×÷»ù±¾²Ù×÷
MySQL³£ÓòÙ×÷»ù±¾²Ù×÷£¬ÒÔ϶¼ÊÇMySQL5.0ϲâÊÔͨ¹ýÊ×ÏÈ˵Ã÷Ï£¬¼ÇסÔÚÿ¸öÃüÁî½áÊøʱ¼ÓÉÏ£»£¨·ÖºÅ£©
1.µ¼³öÕû¸öÊý¾Ý¿â
mysqldump -u Óû§Ãû -p --default-character-set=latin1 Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû(Êý¾Ý¿âĬÈϱàÂëÊÇlatin1)
mysqldump -u wcnc -p smgp_apps_wcnc > wcnc. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ