달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

http://suite.tistory.com/

1. select 결과 -> text 출력


sql> SELECT * INTO OUTFILE '출력파일.txt'  fields terminated by '|' lines terminated by '\n'  FROM 테이블;


2. text ==> db


sql> load data infile '출력파일.txt' into table 테이블 fields terminated by '|' lines terminated by '\n';


* fields terminated by : 필드별 구분자

* lines terminated by : 라인별 구분자


* mysql 5.x 버전의 컴파일 사용시 --enable-local-infile 옵션을 주기 바람

 

:
Posted by mastar