mysqlÖÐIN×Ó²éѯÅÅÐò
Õ⼸Ìì×öÒ»¸ö²éѯ£¬ÐèÒªÔÚÒ»¸öÖ¸¶¨µÄ½á¹û¼¯ÖнøÐвéѯ£¬ÀýÈ磺
select * from table_name where doc_id IN ('1dba', 'c20a', '907b')
ÆäÖÐIN×Ó¾äÖеÄdoc_idÁбíÊÇͨ¹ýµ÷ÓÃÒ»¸öÍⲿ½Ó¿Ú»ñµÃÒ»×édoc_id³£Á¿ÁÐ±í£¬È»ºóÔÚ±¾µØ¿âÖÐËÑË÷·ûºÏÕâ¸öÁбíµÄÊý¾Ý
¼Ç¼¡£ºóÀ´·¢ÏÖmysql·µ»ØµÄ½á¹û¼¯µÄÅÅÐòÊÇ°´ÕÕÈë¿â˳Ðò¸ø³öµÄ£¬µ«ÊÇÎÒÏ£ÍûÄÜ°´ÕÕdoc_idÁбíµÄÏȺó˳Ðò½øÐÐÅÅÐò£¬
¾¹ýgoogleµÃÖª¿ÉÒÔ¸ÄΪ£º
select * from table_name where doc_id IN ('1dba', 'c20a', '907b') order by FIND_IN_SET('1dba', 'c20a', '907b')
¹ûÈ»´ïµ½Ð§¹û¡£
ÔÞ̾sql²©´ó¾«ÉîÐèÒª×ÐϸÑÐÏ°¡£¡£¡£¡£¡£¡£
Ïà¹ØÎĵµ£º
ÐÞ¸ÄrootÃÜÂëµÄʱºò°´ÕÕÍøÉϵÄ˵µÄ¾ÓȻɵɵµÄÖ´ÐÐÁËupdate user set password="asdf" where user="root"£»Ö´ÐÐÖ®ºó·¢ÏÖÃÜÂë´íÁË£¬½øÈ¥²»ÁË£¬ÓÚÊÇÕÛÌÚÁË°ëÌ죬·¢ÏÖmysqlµÄÃÜÂëÊǼÓÃܵIJ»ÊÇÃ÷ÎÄ´æ´¢µÄ£¬ËùÒԸĵÄʱºòÐèÒªÕâÑùset password=password("asdf")¡£´íÎóÒѾ·¢ÉúÁË£¬ÓÚÊǾͰ´ÕÕÏÂÃæµÄ· ......
MySQL£ºÈÕÆÚº¯Êý¡¢Ê±¼äº¯Êý×ܽᣨMySQL 5.X£©
²Î¿¼³¤ÎÄ£º
Ò»¡¢MySQL »ñµÃµ±Ç°ÈÕÆÚʱ¼ä º¯Êý
1.1 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºnow()
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-08 22:20:46 |
+---------------------+
³ýÁË now() º¯ÊýÄÜ»ñµÃµ±Ç°µ ......
ÔÚWindowsÉÏÔËÐÐMySQLµÄ»·¾³¼°ÖµµÃ×¢Òâ
Ò»¸ö32λWindows²Ù×÷ϵͳ£¬Èç³ð£¬ÎÒ£¬NT£¬2000£¬XP»òWindows Server 2003µÄ¡£
Ó²¼þ»·¾³ÒªÇó²¢²»ÊǺܸßÕâ¾ÍÃâÁË¡£
»ùÓÚWindows NT²Ù×÷ϵͳ£¨ÐĄ̂±Ò£¬2000£¬XP£¬2003Ä꣩£¬ÔÊÐíÄúÔËÐÐ×÷Ϊ·þÎñMySQL·þÎñÆ÷¡£Ò»¸öWindows NTʹÓõIJÙ×÷ϵͳ£¬Ç¿ÁÒ½¨Òé¡£²ÎÔĵÚ2.3.11£¬“Æô¶¯MySQL ......
×î½ü¼¸ÌìÏÐÀ´ÎÞÊ£¬±ã³¢ÊÔÁËÒ»ÏÂÓÃC²Ù×÷Êý¾Ý¿â£¬ÏÂÃæ±ãÊÇÎÒ²âÊԵľßÌå½á¹û£º
¿ª·¢»·¾³ÊÇwindows 7 ultimate(Ó¢ÎÄ°æ) IDE ÊÇvs 2008 professional ÖÐÎÄ°æ,Êý¾Ý¿âÊÇmysql 5.1
Ê×ÏÈ£¬ÎÒÔÚMySQL¿âÖд´½¨ÁËÒ»¸ötest±í£º
CREATE TABLE `test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT ......
Î塢ʼþµ÷¶ÈÆ÷²âÊÔ
5.1¡¢²âÊÔÄ¿µÄ
5.1.1 ÅäÖ÷½·¨
5.1.2 ÊÇ·ñÕý³£¹¤×÷
5.1.3 ÈÕ³£µÄά»¤
5.2¡¢Ê¼þµ÷¶ÈÆ÷½éÉÜ
×ÔMySQL5.1.6Æð£¬Ôö¼ÓÁËÒ»¸ö·Ç³£ÓÐÌØÉ«µÄ¹¦ÄÜ
–ʼþµ÷¶ÈÆ÷(Event Scheduler)£¬¿ÉÒÔÓÃ×ö¶¨Ê±Ö´ÐÐijЩÌض¨ÈÎÎñ£¨ÀýÈ磺ɾ³ý
¼Ç¼¡¢¶ÔÊý¾Ý
½øÐлã×ܵȵȣ©£¬À´È¡´ ......