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

ÓйØÓÚMysqlµÄMERGE±íÀàÐÍ

 Ëû½«¶à¸ö±íÔÚÂß¼­Éϵ±×÷Ò»¸ö±íÀ´²éѯ¡£Ëû½¨Á¢ºóÓÐÁ½¸öÎļþ£¬
¡¡¡¡.frm ±í½á¹¹¶¨Òå
¡¡¡¡.mrg union±íµÄÃû×ÖÇåµ¥
¡¡¡¡Á½¸ö»ù±¾±í:
¡¡¡¡CREATE TABLE TEST_MERGE_1(
¡¡¡¡ID INT(5) NOT NULL,
¡¡¡¡VALUE VARCHAR(100) NOT NULL,
¡¡¡¡PRIMARY KEY(ID)
¡¡¡¡)
¡¡¡¡CREATE TABLE TEST_MERGE_2(
¡¡¡¡ID INT(5) NOT NULL,
¡¡¡¡VALUE VARCHAR(100) NOT NULL,
¡¡¡¡PRIMARY KEY(ID)
¡¡¡¡) 
¡¡¡¡MERGE±íµÄ½¨Á¢£º
¡¡¡¡CREATE TABLE TEST_MERGE(
¡¡¡¡ID INT(5) NOT NULL,
¡¡¡¡VALUE VARCHAR(100) NOT NULL,
¡¡¡¡PRIMARY KEY(ID)
¡¡¡¡) TYPE=MERGE UNION=(TEST_MERGE_1,TEST_MERGE_2) INSERT_METHOD=LAST; 
¡¡¡¡1. ´Ë±íÀàËÆÓÚSQLÖеÄunion»úÖÆ¡£
¡¡¡¡2. ´Ë±í½á¹¹±ØÐëÓë»ù±¾±íÍêÈ«Ò»Ö£¬°üÀ¨ÁÐÃû¡¢Ë³Ðò¡£UNION±í±ØÐëͬÊôÒ»¸öDATABASE¡£
¡¡¡¡3. »ù±¾±íÀàÐͱØÐëÊÇMyISAM¡£
¡¡¡¡4. ¿ÉÒÔͨ¹ýÐÞ¸Ä.mrgÎļþÀ´ÐÞ¸ÄMERGE±í£¬Ã¿¸ö»ù±¾±íµÄÃû×ÖÕ¼Ò»ÐС£×¢Ò⣺Ð޸ĺóҪͨ¹ýFLUSH TABLESË¢Ð屒ȼ´æ¡£
¡¡¡¡5. ¶Ô»ù±¾±íµÄ¸ü¸Ä¿ÉÒÔÖ±½Ó·´Ó³Ôڴ˱íÉÏ¡£
¡¡¡¡6. INSERT_METHODµÄÈ¡Öµ¿ÉÒÔÊÇ£º 0 ²»ÔÊÐí²åÈë FIRST ²åÈëµ½UNIONÖеĵÚÒ»¸ö±í LAST ²åÈëµ½UNIONÖеÄ×îºóÒ»¸ö±í¡£(4.0Ö®ºó¿ÉÓÃ)
¡¡¡¡7. ¶¨ÒåÔÚËüÉÏÃæµÄÔ¼ÊøûÓÐÈκÎ×÷Óã¬Ô¼ÊøÊÇÓÉ»ù±¾±í¿ØÖƵģ¬ÀýÈçÁ½¸ö»ù±¾±íÖдæÔÚ×ÅͬÑùµÄÒ»¸öKeyÖµ£¬ÄÇôÔÚMERGE±íÖлáÓÐÁ½¸öÒ»ÑùµÄKeyÖµ¡£
À´Ô´µØÖ·£ºhttp://www.wangchao.net.cn/bbsdetail_542711.html


Ïà¹ØÎĵµ£º

MySQL 5.0°²×°Í¼½â

ÏÂÃæµÄÊÇMySQL°²×°µÄͼ½â:¡¡¡¡
Ë«»÷ÔËÐГsetup.exe”£¬³öÏÖÈçϽçÃ棺 
mysql°²×°Ïòµ¼Æô¶¯£¬°´“Next”¼ÌÐø
Ñ¡Ôñ°²×°ÀàÐÍ£¬ÓГTypical£¨Ä¬ÈÏ£©”¡¢“Complete£¨ÍêÈ«£©”¡¢“Custom£¨Óû§×Ô¶¨Ò壩”Èý¸öÑ¡ÏÎÒÃÇÑ¡Ôñ“Custom”£¬Óиü¶àµÄÑ¡ÏҲ· ......

TomCat6.0Êý¾Ý¿âÁ¬½Ó³ØÅäÖÃʵÀý(mysqlÊý¾Ý¿â)

TomCat6.0Êý¾Ý¿âÁ¬½Ó³ØÅäÖÃʵÀý(mysqlÊý¾Ý¿â)
TomCat6.0Êý¾Ý¿âÁ¬½Ó³ØÅäÖÃÓм¸ÖÖ·½Ê½£¬ÔÚÕâÀïÎÒÖ»½éÉÜÆäÖеÄÒ»ÖÖ¹©´ó¼Ò²Î¿¼£º
ÏÂÃæÎÒ°ÑÅäÖùý³Ì·Ö³ÉÈý¸ö²½ÖèÀ´Íê³É£º
µÚÒ»²½£ºÔÚÄã°²×°TomCatµÄĿ¼ÏÂÕÒµ½context.xmlÅäÖÃÎļþ¡££¨ÀýÈ磺D:\Tomcat 6.0\conf\context.xml£©È»ºó´ò¿ªcontext.xml£¬ÔÚ±êÇ©<context>< ......

php ajax mysql±àÂëgb2312

 1¡¢PHP·¢ËÍÖÐÎÄ¡¢Ajax½ÓÊÕ
Ö»ÐèÔÚphp¶¥²¿¼ÓÈëÒ»¾ä£º
header('Content-type: text/html;charset=GB2312');
xmlHttp»áÕýÈ·½âÎöÆäÖеÄÖÐÎÄ¡£
2¡¢Ajax·¢ËÍÖÐÎÄ¡¢PHP½ÓÊÕ
Õâ¸ö±È½Ï¸´ÔÓ£º
AjaxÖÐÏÈÓÃencodeURIComponent¶ÔÒªÌá½»µÄÖÐÎĽøÐбàÂë
PHPÖУº
$GB2312string=iconv( ‘UTF-8′, ‘gb2312//I ......

linux ÏÂc++¼°mysql¶Ôʱ¼ä´¦ÀíµÄ³£Óü¼ÇÉ

mysql ½Øȡijһ¸öʱ¼ä(datetimeÀàÐÍ)µÄÈÕÆÚ£º
·½·¨1£ºselect date(row_name) from table_name where row = row1;
·½·¨2£ºselect left(row_name, 10) from table_name where row = row1;
·½·¨3£ºselect cast(row_name as char[10]) from table_name where row = row1;
È¡µÃij¸öÈÕÆÚµÄtime_tÊýÖµ£ºselect unix_times ......

Mysql±¸·Ý»¹Ô­µÄÒ»¸öbug

´Ómysql±¸·Ý³öÀ´µÄsqlÎļþ½øÐл¹Ô­²Ù×÷ʱ±¨´í£¬²é¿´´íÎóÈÕÖ¾£¬ÄÚÈÝÈçÏ£º
Error Code: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=50913 DEFAULT CHARSET=gbk' at li ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ