MYSQL Áú¹®

   Á¶È¸ 7618   Ãßõ 0    

a,b,c,d,e,f ¶ó´Â 6°³ÀÇ Å×À̺íÀÌ ÀÖ°í a,b,c,d,e¸¦ f¶ó´Â Å×ÀÌºí¿¡ ³Ö°í½Í½À´Ï´Ù.

union...join µîµî ã¾Æº¸´Ï ¸¹´øµ¥ ÀÌ·±°Ç Çغ»Àûµµ ¾ø´ÂÁö¶ó...¹®ÀÇÁ» µå¸³´Ï´Ù.

°¢ Å×ÀÌºí¸¶´Ù ÇÊµå µ¿ÀÏÇÏ°í Áߺ¹µÇ´Â °ªÀº ¾ø½À´Ï´Ù.



insert into Å×À̺íf SELECT * FROM Å×À̺ía Çϸé Àßµé¾î°¡´Âµ¥ 5°³ ÇѰŹø¿¡´Â ¾îÂî ³Ö¾î¾ßÇÏ´ÂÁö...
서버 모니터링, 라즈베리파이에 관심이 많습니다.
http://www.sproc.co.kr
http://rpi.sproc.co.kr
http://noaa.sproc.co.kr
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.
Á¶¿µ¹Î 2010-02
oracleÀÇ °æ¿ì¶ó mysql¿¡¼­ ¾î¶»°Ô Àû¿ëµÉÁö´Â ¸ð¸£°Ú½À´Ï´Ù¸¸....

insert into AAA
(
select *
from BBB
union all
select *
from CCC
)
insert into f ( select * from (select * from a union select * from b union select * from c union select * from d union select * from e) g);  ÀÌ°Ô ¸ÂÀ»²¨¶ø´Ï´Ù. ÇãÇãÇã
¸ù¸ù 2010-02
scheme °¡ µ¿ÀÏÇÏ°í Áߺ¹µÈ row °ªÀÌ ¾ø´Â Å×À̺íµéÀÇ º´ÇÕÀ̶ó¸é

insert into f (select * from a union select * from b ... union select * from e)

·Î ÇÏ¸é µÇ°Ú³×¿ä
insert into f
(Ä÷³1, Ä÷³2, Ä÷³3, ''''''''')

select Ä÷³1, Ä÷³2, Ä÷³3, ''''''''' from a
union all
select Ä÷³1, Ä÷³2, Ä÷³3, ''''''''' from b
union all
select Ä÷³1, Ä÷³2, Ä÷³3, ''''''''' from c
union all
select Ä÷³1, Ä÷³2, Ä÷³3, ''''''''' from d
union all
select Ä÷³1, Ä÷³2, Ä÷³3, ''''''''' from e
±Ç±âÁØ 2010-02
µ¥ÀÌŸÀÇ ·®ÀÌ ¸¹À» °æ¿ì¿£ union Àº ±ÇÀåÇÏÁö ¾Ê´Â´Ù°í Åë»ó À̾߱âÇÕ´Ï´Ù.
union ¿¬»êÀÚ¸¦ »ç¿ëÇϸé sql ÀÇ ¼º´ÉÀÌ ´ç¿¬È÷ ¾öû³ª°Ô ´À·ÁÁö°í ¼­¹öÀÇ ÀÚ¿øµµ ±×¸¸Å­ ¸¹ÀÌ ¼Ò¸ðµÇ¾î Àüü DB ¼º´Éµµ ´À·ÁÁ®¼­ ¹Ù¶÷Á÷ÇÏÁö ¾Ê´Â °æ¿ì¸¦ ¸¸µé ¼ö ÀÖ½À´Ï´Ù. 
±×³É ½ºÅ©¸³Æ® Çϳª ¸¸µé¾î¼­ batch ·Î °¢ insert ¹®À» Â÷·Ê´ë·Î ½ÇÇà½ÃÅ°´Â °ÍÀÌ ÈξÀ ºü¸¦ ²®´Ï´Ù.
Á˼ÛÇÕ´Ï´Ù. ´Ù µå¸®°í ½ÍÀºµ¥ ÇѸí¹Û¿£ ¾ÈµÇ´Â°Å±º¿ä...


QnA
Á¦¸ñPage 4007/5682
2015-12   1490166   ¹é¸Þ°¡
2014-05   4953685   Á¤ÀºÁØ1
2010-03   13804   dongx3
2010-03   8208   ±èÀº½Ä
2010-03   8558   ³¯°³½ÂÈ£
2010-03   20065   ÃÖºÀÁØ
2010-03   13453   ZEBE
2010-03   9703   ±èÀºÈ£
2010-03   9527   °¡ºü·Î±¸³ª
2010-03   8055   ÀϹÝÀ¯Àú
2010-03   8890   °¡ºü·Î±¸³ª
2010-03   7769   ÀÌÇØÇϸé¿À¡¦
2010-03   10225   º¸½½ºñ³»¸®¡¦
2010-03   35985   ±¸ÇüÈ°¿ë°¡
2010-03   9167   µ¥À̺ñµå
2010-03   7416   ÀÌÀÌÁ¤ÈÆ
2010-03   8502   drama
2010-03   8384   µ¥À̺ñµå
2010-03   12136   ¹Ú
2010-03   8098   dongx3
2010-03   7363   ºÒ¹«°ñ
2010-03   8351   ¸Þ°¡³¯¹é