sqlÖÐjoinmchnoÔõÑùʹÓÃ
joinmchn0 ÊÇÒ»ÖÖ sql Óï¾ä£¬ÓÃÓÚͨ¹ý¹«ÓÃÁйØÁª²î±ð±íÖеÄÊý¾Ý¡£ËüµÄʹÓð취Ϊ£ºÈ·¶¨ÒªÅþÁ¬µÄÁ½¸ö±í¡£Ê¶±ð¹«ÓÃÁС£±àд joinmchn0 Óï¾ä£¬Ö¸¶¨ÒªÅþÁ¬µÄ±íºÍ¹«ÓÃÁС£Ö´ÐÐÅÌÎÊÒÔ¼ìË÷¹ØÁªÊý¾Ý¡£
SQL ÖÐ JOINMCHN0 µÄÓ÷¨
JOINMCHN0 ÏÈÈÝ
JOINMCHN0 ÊÇÒ»ÖÖÌØÊâµÄ SQL Óï¾ä£¬ÓÃÓÚ½«Á½¸ö²î±ð±íÖеÄÊý¾Ý¾ÙÐÐÆ¥ÅäºÍ¹ØÁª¡£Ëüͨ¹ýÖ¸¶¨ÕâÁ½¸ö±íµÄ¹«ÓÃö¾ÙÐÐÅþÁ¬¡£
Ó÷¨
JOINMCHN0 µÄ»ù±¾Óï·¨ÈçÏ£º
SELECT * FROM table1 JOINMCHN0 table2 ON table1.column = table2.column;
µÇ¼ºó¸´ÖÆ
ÆäÖУº
table1 ºÍ table2 ÊÇÒªÅþÁ¬µÄÁ½¸ö±í¡£
column ÊÇÕâÁ½¸ö±íÖÐÓÃÓÚÆ¥ÅäºÍ¹ØÁªµÄ¹«ÓÃÁС£
ÔõÑùʹÓÃ
ҪʹÓà JOINMCHN0£¬Çëƾ֤ÒÔÏ°취²Ù×÷£º
È·¶¨ÒªÅþÁ¬µÄÁ½¸ö±í¡£
ʶ±ðÕâÁ½¸ö±íÖ®¼äµÄ¹«ÓÃÁС£
±àд JOINMCHN0 Óï¾ä£¬Ö¸¶¨ÒªÅþÁ¬µÄ±íºÍ¹«ÓÃÁС£
Ö´ÐÐÅÌÎÊÒÔ»ñÈ¡¹ØÁªµÄÊý¾Ý¡£
ʾÀý
¼ÙÉèÓÐÁ½¸ö±í£º¿Í»§ ±íºÍ ¶©µ¥ ±í¡£¿Í»§ ±íÖаüÀ¨¿Í»§ÐÅÏ¢£¬¶©µ¥ ±íÖаüÀ¨¶©µ¥ÏêϸÐÅÏ¢¡£ÕâÁ½¸ö±íͨ¹ý ¿Í»§±àºÅ ÁйØÁª¡£
Òª½«ÕâЩ±íÅþÁ¬²¢¼ìË÷¿Í»§¼°Æ䶩µ¥ÐÅÏ¢£¬¿ÉÒÔʹÓà JOINMCHN0 Óï¾ä£º
SELECT * FROM ¿Í»§ JOINMCHN0 ¶©µ¥ ON ¿Í»§.¿Í»§±àºÅ = ¶©µ¥.¿Í»§±àºÅ;
µÇ¼ºó¸´ÖÆ
Ö´ÐдËÅÌÎʽ«·µ»ØÒ»¸ö±í£¬ÆäÖаüÀ¨Á½¸ö±íÖеÄËùÓÐÁÐÒÔ¼°¹ØÁªµÄÊý¾Ý¡£
ÒÔÉϾÍÊÇsqlÖÐjoinmchnoÔõÑùʹÓõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡