MYSQL Áú¹®

   Á¶È¸ 7610   Ãßõ 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 3966/5679
2015-12   1479413   ¹é¸Þ°¡
2014-05   4942594   Á¤ÀºÁØ1
2010-06   8143   ³ª³Ê¿ì¸®
2010-06   7734   ¼­¿ïl½Â¿ë
2010-06   7028   ºÐ´ç±èµ¿¼ö
2010-06   7506   ±Ç¼ø±Ô
2010-06   16933   ·Î±×¾Æ¿ô
2010-06   7074   ·Î±×¾Æ¿ô
2010-06   11008   ÇѼºÅÃ
2010-06   7076   ¼Õ°æÈ­
2010-06   8660   À̺´ÇÑ
2010-06   7070   ·Î±×¾Æ¿ô
2010-06   8671   ÂôÂô
2010-06   7240   ¹èÁÖ±Ô
2010-06   13264   À±Ä¡¿­
2010-06   7508   ¹ÎÁؾƺü
2010-06   7782   ·Î±×¾Æ¿ô
2010-06   13641   ÀçÈ«ÀÌ
2010-06   8316   tualatin
2010-06   11406   klein
2010-06   7783   ¿ÀÁ¤±Õ
2010-06   10124   ¼Õ°æÈ­