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

¸ã¶¨MySQLÊý¾Ý¿âÖÐÎÄÄ£ºý¼ìË÷ÎÊÌâ

ÔÚ MySQLÏ£¬ÔÚ½øÐÐÖÐÎÄÄ£ºý¼ìË÷ʱ£¬¾­³£»á·µ»ØһЩÓëÖ®²»Ïà¹ØµÄ¼Ç¼£¬Èç²éÕÒ "%a%" ʱ£¬·µ»ØµÄ¿ÉÄÜÓÐÖÐÎÄ×Ö·û£¬È´Ã»ÓÐa×Ö·û´æÔÚ¡£±¾ÈËÒÔÇ°Ò²ÔøÓöµ½¹ýÀàËÆÎÊÌ⣬¾­ÏêϸÔĶÁMySQLµÄManual£¬·¢ÏÖ¿ÉÒÔÓÐÒ»ÖÖ·½·¨ºÜ·½±ãµÄ½â¾ö²¢µÃµ½ÂúÒâµÄ½á¹û¡£
¡¡¡¡Àý×Ó£º
¡¡¡¡Ï£Íûͨ¹ý“±êÌ┶ÔÐÂÎÅ¿â½øÐмìË÷£¬¹Ø¼ü×Ö¿ÉÄÜ°üº¬ÊÇÖÐÓ¢ÎÄ£¬ÈçÏÂSQLÓï¾ä£º
¡¡¡¡QUOTE:
¡¡¡¡select id,title,name from achech_com.news where title like '%a%'
¡¡¡¡·µ»ØµÄ½á¹û£¬Ä³Ð©title×Ö¶ÎÈ·¶¨´øÁË“a”¹Ø¼ü×Ö£¬¶øÓÐЩÔòÖ»ÓÐÖÐÎÄ£¬µ«Ò²ËæÖ®·µ»ØÔÚ¼ìË÷½á¹ûÖС£
¡¡¡¡½â¾ö·½·¨£¬Ê¹Óà BINARY ÊôÐÔ½øÐмìË÷£¬È磺
¡¡¡¡QUOTE:
¡¡¡¡select id,title,name from achech_com.news where binary title like '%a%'
¡¡¡¡·µ»ØµÄ½á¹û½Ï֮ǰÕýÈ·£¬µ«Ó¢ÎÄ×ÖĸÇø·Ö´óСд£¬¹ÊÓÐʱÔÚ¼ìË÷Èç“Achech”¼°“achech”µÄ½á¹ûÊDz»Ò»ÑùµÄ¡£ÖªµÀÁËʹÓà BINARY ÊôÐÔ¿ÉÒÔ½â¾öÇ°ÃæÕâ¸öÎÊÌ⣬ÔÙ¿´¿´ MySQL Ö§³ÖµÄUCASE ¼° CONCAT º¯Êý£¬ÆäÖÐ UCASE Êǽ«Ó¢ÎÄÈ«²¿×ª³É´óд£¬¶øCONCATº¯ÊýµÄ×÷ÓÃÊǶÔ×Ö·û½øÐÐÁ¬½Ó£¬ÒÔÏÂÊÇÎÒÃÇÍêÈ«½â¾öºóµÄSQL Óï¾ä£º
¡¡¡¡QUOTE:
¡¡¡¡select id,title,name from achech_com.news
¡¡¡¡where binary ucase(title) like concat('%',ucase('a'),'%')
¡¡¡¡¼ìË÷µÄ²½ÖèÊÇÏȽ«ÊôÐÔÖ¸¶¨Îª BINARY £¬ÒÔ¾«È·¼ìË÷½á¹û£¬¶ø±» like µÄ titleÄÚÈÝ´æÔÚ´óСд×ÖĸµÄ¿ÉÄÜ£¬¹ÊÏÈʹÓà ucase º¯Êý½«×Ö¶ÎÄÚÈÝÈ«²¿×ª»»³É´óд×Öĸ£¬È»ºóÔÙ½øÐÐ like ²Ù×÷£¬¶ø like µÄ²Ù×÷ʹÓÃÄ£ºý·½·¨£¬Ê¹Óà concatµÄºÃ´¦ÊÇ´«½øÀ´µÄ¿ÉÒÔÊÇÖ±½ÓµÄ¹Ø¼ü×Ö£¬²»ÐèÒª´ø“%”ÍòÓ÷û£¬½«“'a'”Ö±½Ó»»³ÉÄãµÄ±äÁ¿£¬ÔÚÈκÎÓïÑÔ϶¼ÍòÊÂÎÞÓÇÁË¡£ µ±È»ÄãÒ²¿ÉÒÔÕâôд£º
¡¡¡¡QUOTE:
¡¡¡¡select id,title,name from achech_com.news where binary ucase(title) like ucase('%a%')
¡¡¡¡¼ìË÷µÄ½á¹û»¹ËãÂúÒâ°É£¬²»¹ýËٶȿÉÄÜ»áÒò´Ë¶øÂýNºÁÃë¡£


Ïà¹ØÎĵµ£º

mysql °²×°

http://blog.csdn.net/digyso888/archive/2008/12/18/3552981.aspx
 MySQL°²×°µÄͼ½â5.0.28 ÊÕ²Ø
MySQL°²×°µÄͼ½â£¨×îа棩¡¡¡¡´ò¿ªÏÂÔصÄmysql°²×°Îļþmysql-5.0.27-win32.zip£¬Ë«»÷½âѹËõ£¬ÔËÐГsetup.exe”£¬³öÏÖÈçϽçÃ棺
¡¡¡¡mysql°²×°Ïòµ¼Æô¶¯£¬°´“Next”¼ÌÐø
 
¡¡¡¡Ñ¡Ôñ° ......

mysqlÈÝÒ×±»ºöÂÔµÄÓ÷¨

1.ÔÚ´´½¨±íµÄͬʱ´´½¨Ë÷Òý
  CREATE TABLE material(id INT NOT NULL, name char(40) NOT NULL, resistance INT, INDEX index1(id,name), UNIQUE INDEX index2(name))
  µÚÒ»¸öË÷Òý£¬ÃûΪindex1£¬ÓÉidºÍnameÁ½¸ö×Ö¶Î×é³É¡£µÚ¶þ¸öË÷ÒýÖ»°üº¬name£¬²¢Ö¸Ã÷name×ֶεÄÖµ±ØÐëÊÇΨһµÄ¡£
2.²åÈëÊý¾Ý£¬¿ÉÒÔͨ¹ýÆäËûij ......

MySQL FOR LINUX


MySQL FOR LINUX
Ïȼì²éϵͳÊÇ·ñ×°ÉÏÁËmysql£¬Èç¹ûÓн«ÆäжÔصô
rpm -qa | grep mysql
×¢ÒâmysqlµÄ´óСд£¬´óСд¶¼ÓпÉÄÜ
rpm -e --nodeps mysql*
Ò»¶¨ÒªÓÃ--nodepsжÔØ£¬²»¼ì²éÒÀÀµÐÔ¹Øϵ¡£
´´½¨Óû§mysql
groupadd mysql
useradd -g mysql mysql
passwd mysql
ÔÚ/usr/localϽ¨Á¢ mysql Îļþ¼Ð
È»ºó½«°²×°Î ......

MYSQLÔÚWindows 2003ÉÏÁ¬½Ó²»ÉϵĽâ¾ö·½·¨

½ñÌì´î½¨mysqlÊý¾Ý¿â,Á¬½ÓÁË°ëÌì,¶¼Ìáʾ10061´íÎó,ÒÔΪÃÜÂë³öÁËÎÊÌâÊÔÁË°ëÌì,ѹ¸ùÁ¬·þÎñ¶¼Á¬½Ó²»ÉÏ,æ»îÁË°ë¸ö¶àСʱ,²Å·¢ÏÖÊÇϵͳ²¹¶¡´òÁËÖ®ºó³öÏÖµÄÎÊÌâ(kb967723)
ÓÚÊÇÍøÉÏÕÒÁËÒ»ÏÂ×ÊÁÏ
×î½üÒ»¸ö¿Í»§·þÎñÆ÷µÄMYSQLƵ·±ÌáʾÁ¬½Ó²»ÉÏ£¬ÐÞ¸ÄÁËMYSQLµÄ×î´óÁ¬½ÓÊý»¹ÊÇÕâÑù£¬ÓÚÊÇ¿ªÊ¼ÎÊÍòÄܵÄËÑË÷ÒýÇæ´óÈË£¡ÖÕÓÚÔÚ΢ÈíÕÒµ½ÁË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ