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

mysql µÄdelimiter

ÎÒÔÚ EMS SQL Manager 2005 for MySQL Õâ¸ö MySQL ͼÐοͻ§¶ËÏ¿ÉÒÔ˳ÀûÔËÐС£µ«ÊÇÔÚ SQLyog MySQL GUI v5.02 Õâ¸ö¿Í»§¶Ë¾Í»á³ö´í¡£×îºóÕÒµ½Ô­ÒòÊÇûÓÐÉèÖúà delimiter µÄÎÊÌ⡣ĬÈÏÇé¿öÏ£¬delimiter “;” ÓÃÓÚÏò MySQL Ìá½»²éѯÓï¾ä¡£ÔÚ´æ´¢¹ý³ÌÖÐÿ¸ö SQL Óï¾äµÄ½áβ¶¼Óиö “;”£¬Èç¹ûÕâʱºò£¬Ã¿·ê “;” ¾ÍÏò MySQL Ìá½»µÄ»°£¬µ±È»»á³öÎÊÌâÁË¡£ÓÚÊǸü¸Ä MySQL µÄ delimiter£¬ÉÏÃæ MySQL ´æ´¢¹ý³Ì¾Í±à³ÌÕâÑù×ÓÁË£º
mysql> delimiter //     -- ¸Ä±ä MySQL delimiter Ϊ£º“//” ĩβ²»Òª·ûºÅ “;”
mysql>
mysql> drop procedure if exists pr_stat_agent //
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> -- call pr_stat_agent ('2008-07-17', '2008-07-18')
mysql>
mysql> create procedure pr_stat_agent
    -> (
    ->    pi_date_from  date
    ->   ,pi_date_to    date
    -> )
    -> begin
    ->    -- check input
    ->    if (pi_date_from is null) then
    ->       set pi_date_from = current_date();
    ->    end if;
    ->
    ->    if (pi_date_to is null) then
    ->       set pi_date_to = pi_date_from;
    ->    end if;
    ->
    ->    set pi_date_to = date_add(pi_date_from, interval 1 day);
    ->
    ->    -- stat
    ->    select agent, count(*) as cnt
    ->      from apache_log
    ->     where request_time >= pi_date_from
    -> &nb


Ïà¹ØÎĵµ£º

MySQLÖ®Covering Index hust ei


http://hi.baidu.com/thinkinginlamp/blog/item/a352918fe70d96fd503d925e.html
2009Äê01ÔÂ12ÈÕ ÐÇÆÚÒ» ÏÂÎç 08:35
×÷ÕߣºÀÏÍõ
ÔÚÍøÉÏËæ±ãËÑËÑ£¬¾ÍÄÜÕÒµ½´ó°ÑµÄ¹ØÓÚMySQLÓÅ»¯µÄÎÄÕ£¬²»¹ýÀïÃæºÜ¶à¶¼²»×¼È·£¬Ëµ¸ö³£¼ûµÄ£º
SELECT a from ... WHERE b = ...
Ò»°ãÀ´Ëµ£¬ºÜ¶àÎÄÕÂ»á¸æ½ëÄãÀàËÆÕâÑùµÄ²éѯ£¬²»ÒªÔÚ“a ......

mysql ÃüÁî

²é¿´linuxÉÏÊÇ·ñ°²×°mysql
rpm -qa|grep mysql  ;Èç¹ûÓÐmysql°ü£¬±¾»úÓÐmysql£»
service mysqld status;²é¿´mysqlµÄ״̬£¬Èç¹ûΪstop״̬£¬¿ÉÒÔÓÃservice mysqld startÀ´Æô¶¯£»
怬
   mysql  -h Ö÷»úµØÖ·  -uÓû§Ãû -pÃÜÂ룻µÇ¼³É¹¦ºó½øÈëmysql״̬£»
Êý¾Ý¿â²Ù×÷
show databases£»ÏÔʾµ± ......

MySQLÓëÊÂÎñ


×÷ÕߣºÀÏÍõ
MySQL5.X¶¼ÒѾ­·¢²¼ºÃ¾ÃÁË£¬µ«ÊÇ»¹ÓкܶàÈËÈÏΪMySQLÊDz»Ö§³ÖÊÂÎñ´¦ÀíµÄ£¬Õâ²»µÃ²»¹ÖËûÃÇÊǹª¹ÑÎŵ쬯äʵ£¬Ö»ÒªÄãµÄMySQL°æ±¾Ö§³ÖBDB»òInnoDB±íÀàÐÍ£¬ÄÇôÄãµÄMySQL¾Í¾ßÓÐÊÂÎñ´¦ÀíµÄÄÜÁ¦¡£ÕâÀïÃæ£¬ÓÖÒÔInnoDB±íÀàÐÍÓõÄ×î¶à£¬ËäÈ»ºóÀ´·¢ÉúÁËÖîÈçOracleÊÕ¹ºInnoDBµÈÁîMySQL²»Ë¬µÄÊÂÇ飬µ«ÄÇЩÉÌÒµÉϵĶ·ÕùÓ ......

MySQL¿ª·¢Ð¡½á

       ×î½üÕýÔÚ½øÐÐÒ»¸ö¶þ´Î¿ª·¢½Ó¿ÚµÄÏîÄ¿£¬ÔÚ¿ª·¢¹ý³ÌÖз¢ÏÖ£ºÎÒÃÇ֮ǰʹÓõĴ¦Àí¿Í»§¶ËºÍWEBÖ®¼ä±àÂë¼æÈÝÎÊÌâµÄ·½·¨ÊÇ´æÔÚÎÊÌâµÄ¡£ÓÉÓÚΪÁËÖ§³Ö¶àÓïÑÔ£¬Êý¾Ý¿â±íÖÐÀàÐÍΪvarcharµÄ×ֶΣ¬ËûÃǵÄ×Ö·û¼¯¶¼ÉèÖóÉÁËutf8¡£Ö®Ç°µÄ×ö·¨Êǿͻ§¶Ë½«×Ö·û´®µÄ±àÂë¸Ä³Éutf8±àÂ룬Ȼºó½«¸Ãutf8±àÂëµÄ× ......

Hibernate MySQL ÖÐÎÄÂÒÂëÎÊÌâ


Hibernate MySQL ÖÐÎÄÂÒÂëÎÊÌâ
»·¾³£ºHibernate 2.1.7 + MySQL4.1£¨MySQLµÄ±àÂëÒÑÉèÖÃΪutf8£©
ÎÊÌ⣺ͨ¹ýHibernateÏòMySQLдÈëÖÐÎĺó£¬Í¨¹ýHibernateÈ¡»ØÊý¾Ý£¬ÔÚconsoleÖдòÓ¡java¶ÔÏóÏÔʾÕý³£¡£µ«ÔÚMySQL Query BrowserÖп´µ½µÄÊÇÂÒÂ룬´«¸øÇ°¶ËµÄFlexÒ²ÊÇÂÒÂë¡£
Ô­Òò£ºHibernateµÄ»ù´¡»¹ÊÇJDBC£¬ËùÒÔÒ»ÑùÐèÒªÉèÖà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ