mysql> SELECT * INTO OUTFILE 'ÆÄÀÏ°æ·Î'(Option) FROM Å×À̺í;
- Option -
- fields terminated by '|' : Çʵ庰 ±¸ºÐÀÚ ÁöÁ¤
- optionally enclosed by '"' : ¹®ÀÚÇüÇʵ带 ""·Î ÀúÀå
- lines terminated by '\n' : ·¹Äڵ庰 ±¸ºÐÀÚ ÁöÁ¤
[root@chonnom ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12954 to server version: 3.23.58-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use Database;
Database changed
mysql> select * into outfile 'test' from tables_name where server_ip='115.68.27.77';
ÆÄÀÏÀúÀå°æ·Î¸¦ ÁöÁ¤ÇØÁÖÁö ¾Ê°í ÆÄÀÏ¸í¸¸ ÁöÁ¤ÇØÁÖ¸é mysql data databases Æú´õ¿¡ ÀúÀåµÈ´Ù.
¾Æ·¡¿Í °°Àº ÇüÅ·ΠÀúÀåµÈ´Ù. (°³Àε¥ÀÌŸÀÓ... Âü°í¸¸ ÇϽñæ...)
570 144 0 5 \N 1 2009-11-19 16:31:34
568 144 0 5 \N 1 2009-11-19 16:31:34
565 144 554 2 \N 1 2009-11-19 16:31:34
567 144 0 5 \N 1 2009-11-19 16:31:34
560 144 20 2 \N 1 2009-11-19 16:31:34
561 144 21 2 \N 1 2009-11-19 16:31:34
566 144 3389 2 \N 1 2009-11-19 16:31:34
569 144 0 5 \N 1 2009-11-19 16:31:34
564 144 445 2 \N 1 2009-11-19 16:31:34
562 144 135 2 \N 1 2009-11-19 16:31:34
563 144 139 2 \N 1 2009-11-19 16:31:34
559 144 20 2 \N 1 2009-11-19 16:31:34
557 144 17 2 \N 1 2009-11-19 16:31:34
558 144 19 2 \N 1 2009-11-19 16:31:34
556 144 13 2 \N 1 2009-11-19 16:31:34
555 144 9 2 \N 1 2009-11-19 16:31:34
554 144 7 2 \N 1 2009-11-19 16:31:34
553 144 80 1 \N 1 2009-11-19 16:31:34
571 144 0 5 \N 1 2009-11-19 16:31:34
572 144 0 5 \N 1 2009-11-19 16:31:34
573 144 0 5 \N 1 2009-11-19 16:31:34
574 144 0 5 \N 1 2009-11-19 16:31:34
575 144 0 5 \N 1 2009-11-19 16:31:34
576 144 0 5 \N 1 2009-11-19 16:31:34
577 144 0 5 \N 1 2009-11-19 16:31:34
578 144 0 5 \N 1 2009-11-19 16:31:34
579 144 0 5 \N 1 2009-11-19 16:31:34
580 144 0 6 \N 1 2009-11-19 16:31:34
ÀÌ °¡°øµÈ µ¥ÀÌŸ¸¦ ´Ù½Ã EXCEL ·Î ¹Ù²Ù°í ½Í´Ù¸é....
1) ÀúÀåÇÑ ÆÄÀÏÀ» °¡Á®¿Â´Ù.
2) ¿¢¼¿ ÇÁ·Î±×·¥À» ½ÇÇàÇÏ°í ÆÄÀϸ޴º¿¡¼ ¿±â ¼±ÅÃ
3) ¿±â¸Þ´ºÀÇ ÆÄÀÏÇü½ÄÀ» ÅؽºÆ®·Î ¼±ÅÃÇÏ°í ¿±â¸¦ Çϸé ÅؽºÆ®¸¶¹ý»ç°¡ ½ÇÇàµÈ´Ù.
4) ¸¶¹ý»ç 1 ´Ü°è - "±¸ºÐ±âÈ£·Î ºÐ¸®µÊ"
5) ¸¶¹ý»ç 2´Ü°è - ±¸ºÐ±âÈ£ ¼±Åà (±âº»Àº ÅÇ)
6) ¸¶¹ý»ç 3´Ü°è - °¢ Çʵ忡 ´ëÇÑ ¿¢¼¿ÀÇ µ¥ÀÌŸ ÇüŸ¦ ÁöÁ¤