¦³µL¤èªk¥i¥H¦P®É¬d¸ß¥X¬Û¦P¸ê®Æ®w¬Û¦PÄæ¦ì¤£¦P±ø¥óªº¸ê®Æ
°²³]§Únªºsql«ü¥O¬°:SELECT ·~ÁZ(a³¡ªù),·~ÁZ(b³¡ªù) WHERE ®Æ¸¹=1 AND XX
¸ê®Æ®wµ²ºc¬°
®Æ¸¹,³¡ªù,·~ÁZ
1,A,10
1,B,10
2,A,20
2,B,20
³o¼Ëªº¸Ü,§Ún¨ú¥X®Æ¸¹¬°1ªºA³¡ªù·~ÁZ10©MB³¡ªù·~ÁZ10
n¦p¦ó¥u¦³¤@µ§¸ê®Æ,¦Ó¤£¬O¬d¥X¨âµ§¸ê®Æ©O?
¨Ò¦p:SELECT ·~ÁZ(a³¡ªù),·~ÁZ(b³¡ªù) WHERE ®Æ¸¹=1 AND XX
µM«áµª®×·|±o¨ì¤@µ§¸ê®Æ¦p¥kÃä: 10,10
¦³³oºØ¥i¯à©Ê¶Ü?
¦Ó¤£¬O±o¨ì¨âµ§¸ê®Æ¦p¤U:
10
10
¦]¬°¹ê»Ú¤W¬On·f°tLEFT JOIN ©M¨ä¥Lªº¸ê®Æ¤@°_¨Ï¥Îªº
ÁÙ¬O¥u¯à¤G¦¸¥[¤u? |