ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦X¨Ö¸ê®Æªí»yªk°ÝÃD¡H

[µo°Ý] ¦X¨Ö¸ê®Æªí»yªk°ÝÃD¡H

¤£¦n·N«ä¡A¤p§Ì¦Û¤v¬ã¨s«Ü¤[¤F¡A¥ýÁn©ú³o¤£¬O¥\½Ò¡A¬O¤p§Ì¬ã¨sªÑ²¼¡A¥u¤£¹L©ñ¦b¸ê®Æ®w¤¤¡A·Q§â¥¦§ì¥X¨Ó§Q¥Î¤@¤U¡I
¦@¦³¤T­Óªí¡A¤p§Ì·Q¨Ö¦¨¤@­Ó¡A¹³¤¤¶¡¨º¤@­Ó¡A¥i¬O¤p§Ì³Ì«á¥u¨Ö¦¨³Ì«á¤@­Ó»yªk¦p¤U¡G

select a.*,b.*,c.* from AAA a left join BBB b on a.¥N¸¹=b.¥N¸¹ left join CCC C on a.¥N¸¹=c.¥N¸¹ where a.¤é´Á='2009/4/1'

¤£ª¾¹D¦³­þ¤@­Ó°ª¤H¥i¥H«üÂI¤@¤U¡A¤p§Ì¶R®Ñ¸Õ¤F¦n¤[¡Aleft join ¡A right join ¡AÁÙ¦³¤@¯ë±`¥Îªºwhereµ¥»yªk¡A¥i¬OÁÙ¬OµLªk¸Ñ¨M¡A¤£ª¾¹D±`¥Îsqlªº°ª¤â¡A«üÂI¤p§Ì°g¬z¡AÁÂÁÂ


«e­±ªºProjection:
SELECT a.¤é´Á, a.¥N¸¹, a.¦¬½L, b.¿Ä¸ê, c.¤T¤jªk¤H from...

TOP

select *,(Select top 1 ¿Ä¸ê from BBB Where BBB.¤é´Á=AAA.¤é´Á And BBB.¥N¸¹=AAA.¥N¸¹)
,(Select top 1 ¤T¤jªk¤H from CCC Where CCC.¤é´Á=AAA.¤é´Á And CCC.¥N¸¹=AAA.¥N¸¹)
From AAA

TOP

¼Ó¤W¤j¤j,¦³¤À¶q,¤l¬d¸ß«Ü¼ô±x,¦³°ª¤âªº¬[¶Õ

TOP

        ÀR«ä¦Û¦b : ¦a¤WºØ¤Fµæ¡A´N¤£©öªø¯ó¡F¤ß¤¤¦³µ½¡A´N¤£©ö¥Í´c¡C
ªð¦^¦Cªí ¤W¤@¥DÃD