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

mysqlµÄ´óСдÎÊÌâ

 
´óСдÃô¸ÐÐÔ
1¡¢Êý¾Ý¿âºÍ±íÃû
ÔÚMySQLÖУ¬Êý¾Ý¿âºÍ±í¶ÔÓ¦ÓÚÔÚÄÇЩĿ¼ÏµÄĿ¼ºÍÎļþ£¬Òò¶ø£¬ÄÚÔڵIJÙ×÷ϵͳµÄÃô¸ÐÐÔ¾ö¶¨Êý¾Ý¿âºÍ±íÃüÃûµÄ´óСдÃô¸ÐÐÔ¡£ÕâÒâζ×ÅÊý¾Ý¿âºÍ±íÃûÔÚUnixÉÏÊÇÇø·Ö´óСдµÄ£¬¶øÔÚWin32ÉϺöÂÔ´óСд¡£
×¢Ò⣺ÔÚWin32ÉÏ£¬¾¡¹ÜÊý¾Ý¿âºÍ±íÃûÊǺöÂÔ´óСдµÄ£¬Äã²»Ó¦¸ÃÔÚͬһ¸ö²éѯÖÐʹÓò»Í¬µÄ´óСдÀ´ÒýÓÃÒ»¸ö¸ø¶¨µÄÊý¾Ý¿âºÍ±í¡£ÏÂÁвéѯ½«²»¹¤×÷£¬ÒòΪËü×÷Ϊmy_tableºÍ×÷ΪMY_TABLEÒýÓÃÒ»¸ö±í£º
mysql> SELECT * from my_table WHERE
MY_TABLE.col=1;
2¡¢ÁÐÃû
ÁÐÃûÔÚËùÓÐÇé¿ö϶¼ÊǺöÂÔ´óСдµÄ¡£
3¡¢±íµÄ±ðÃû
±íµÄ±ðÃûÊÇÇø·Ö´óСдµÄ¡£ÏÂÁвéѯ½«²»¹¤×÷£¬: ÒòΪËüÓÃaºÍAÒýÓñðÃû£º
mysql> SELECT col_name from tbl_name AS a
          
WHERE a.col_name = 1 OR A.col_name = 2;
4¡¢ÁеıðÃû
ÁеıðÃûÊǺöÂÔ´óСдµÄ¡£
5¡¢×Ö·û´®±È½ÏºÍģʽƥÅä
ȱʡµØ£¬MySQLËÑË÷ÊÇ´óСд²»Ãô¸ÐµÄ(¾¡¹ÜÓÐһЩ×Ö·û¼¯´ÓÀ´²»ÊǺöÂÔ´óСдµÄ£¬ÀýÈç½Ý¿ËÓï)¡£ÕâÒâζ×Å£¬Èç¹ûÄãÓÃcol_name LIKE 'a%'ËÑÑ°£¬Ä㽫µÃµ½ËùÓÐÒÔA»òa¿ªÊ¼µÄÁÐÖµ¡£Èç¹ûÄãÏëҪʹÕâ¸öËÑË÷´óСдÃô¸Ð£¬Ê¹ÓÃÏóINDEX(col_name, "A")=0¼ì²éÒ»¸öǰ׺¡£»òÈç¹ûÁÐÖµ±ØÐëÈ·ÇÐÊÇ"A"£¬Ê¹ÓÃSTRCMP(col_name, "A") = 0¡£
¼òµ¥µÄ±È½Ï²Ù×÷(>=¡¢>¡¢= ¡¢< ¡¢<=¡¢ÅÅÐòºÍ¾ÛºÏ)ÊÇ»ùÓÚÿ¸ö×Ö·ûµÄ“ÅÅÐòÖµ”¡£ÓÐͬÑùÅÅÐòÖµµÄ×Ö·û(ÏóE£¬e)±»ÊÓΪÏàͬµÄ×Ö·û£¡
LIKE±È½ÏÔÚÿ¸ö×Ö·ûµÄ´óдֵÉϽøÐÐ(“E”=”e”)¡£
Èç¹ûÄãÏëÒªÒ»¸öÁÐ×ÜÊDZ»µ±×÷´óСдÃô¸ÐµÄ·½Ê½£¬ÉùÃ÷ËüΪBINARY¡£
ÀýÈ磺
mysql> SELECT
"E"="e","E"=BINARY "e";
+---------+----------------+
| "E"="e" | "E"=BINARY "e" |
+---------+----------------+
|       1 |              0 |
+---------+----------------+


Ïà¹ØÎĵµ£º

CentOSÏÂMySql 5.0.xµÄ°²×°¡¢ÓÅ»¯¼°°²È«ÉèÖÃ

 groupadd mysql
н¨Ò»¸öÃûΪmysqlµÄÓû§×é
useradd -g mysql mysql
ÔÚmysqlÓû§×éÏÂн¨Ò»¸öÃûΪmysqlµÄÓû§
gunzip ½âѹÏÂÔص½µÄ.gzÎļþ
cd mysql-VERSION
½øÈë½âѹºóµÄĿ¼
CFLAGS="-O3 -mcpu=pentium4" CXX=gcc CXXFLAGS="-O3 -march=pentium4 -felide-constructors -fno-exceptions -fno-rtti" ./configu ......

mysqlÖÐÎÄÅÅÐò¼°javaÖÐÎÄÅÅÐò


Ö®ËùÒÔдÕâƪ²©¿Í£¬ÊÇÒòΪǰ¼¸Ìì²ÅÅöµ½ÁËÕâôһ¸öÎÊÌ⣬ÒÔÇ°»¹²»ÖªµÀmysqlÓÐÕâôһ¸öÎÊÌâ¡£
ÎÒÃǵÄϵͳʹÓÃÁËstruts+hibernate£¬Êý¾Ý¿âʹÓõÄÊÇmysql£¬×Ö·û¼¯Í³Ò»Îªutf-8¡£
±¾À´ÒѾ­Íê³ÉÁË£¬µ«ÊÇϵͳʹÓõÄʱºò£¬·¢ÏÖ²é³öÀ´µÄÈËÃûûÓÐ˳Ðò£¬±¾À´ÒÔΪºÜ¼òµ¥£¬ÔÚ²éѯµÄʱºò£¬Ö¸¶¨°´ÕÕnameÅÅÐò¾Í¿ÉÒÔÁË£¬Æñ֪ʵ¼ÊÒ»×ö²Å·¢Ï ......

mysql ÈÕÆÚº¯Êý

 ¶ÔÓÚÿ¸öÀàÐÍÓµÓеÄÖµ·¶Î§ÒÔ¼°²¢ÇÒÖ¸¶¨ÈÕÆÚºÎʱ¼äÖµµÄÓÐЧ¸ñʽµÄÃèÊö¼û7.3.6 ÈÕÆÚºÍʱ¼äÀàÐÍ¡£ 
ÕâÀïÊÇÒ»¸öʹÓÃÈÕÆÚº¯ÊýµÄÀý×Ó¡£ÏÂÃæµÄ²éѯѡÔñÁËËùÓмǼ£¬Æädate_colµÄÖµÊÇÔÚ×îºó30ÌìÒÔÄÚ£º 
mysql> SELECT something from table 
WHERE TO_DAYS(NOW())&nbs ......

Îå¸ö³£ÓÃMySQLͼÐλ¯¹ÜÀí¹¤¾ß

MySQLÊÇÒ»¸ö·Ç³£Á÷ÐеÄСÐ͹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ£¬2008Äê1ÔÂ16ºÅ±»Sun¹«Ë¾ÊÕ¹º¡£Ä¿Ç°MySQL±»¹ã·ºµØÓ¦ÓÃÔÚInternetÉϵÄÖÐСÐÍÍøÕ¾ÖС£ÓÉÓÚÆäÌå»ýС¡¢Ëٶȿ졢×ÜÌåÓµÓгɱ¾µÍ£¬ÓÈÆäÊÇ¿ª·ÅÔ´ÂëÕâÒ»Ìص㣬Ðí¶àÖÐСÐÍÍøվΪÁ˽µµÍÍøÕ¾×ÜÌåÓµÓгɱ¾¶øÑ¡ÔñÁËMySQL×÷ΪÍøÕ¾Êý¾Ý¿â¡£
1¡¢phpMyAdmin£¨http://www.phpmyadmin.net/£©
......

ubuntuÖÐmysqlÂÒÂëÎÊÌâ

 ÏÈ¿´ÏÂÃæ×¢ÒâÄÚÈÝ
ÕûÕûŪÁËÒ»Ì죬ÖÕÓÚ½â¾öÁËjdbc(mysql-connector-java-5.0.30)ºÍmysqͨÐÅÖÐÎÄÂÒÂëµÄÎÊÌ⣡ÎÒµÄϵͳÊÇ
linux£¨ubuntu£©¡£ÔÚjavaÖУ¨Myeclipse»·¾³£©Ê¹ÓÃhibernateÁ¬½Ómysql¡£´æ´¢Ó¢ÎÄûÎÊÌ⣬д£¨insert
into£©ºÍ¶Á£¨select£©¶¼ÄÜÕýÈ·ÏÔʾ£¬µ«ÊÇÈôÆäÖдøÓÐÖÐÎÄ×Ö·û¾Í³ÉÂÒÂëÁË¡£µ½ÍøÉϲéÕÒÁË°ëÌì×ÊÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ