반응형
sqlite에서 데이터 덤프뜨는 법에 대해 봅시다.
아주 간단합니다.
덤프 뜨는 법
sqlite> .output mydump.sql
sqlite> .dump.
sqlite> .output stdout
덤프 뜬 파일 다시 넣는 법
.read mydump.sql
설정 정보 확인하기
sqlite> .show
echo: off
eqp: off
explain: auto
headers: on
mode: column --wrap 60 --wordwrap off --noquote
nullvalue: ""
output: stdout
colseparator: "|"
rowseparator: "\n"
stats: off
width: 0 0 0 0 0
filename: test.db
cvs 형식의 파일로 내보내기
sqlite> .output file.csv
sqlite> .mode csv
sqlite> select * from test;
sqlite> .output stdout
csv 형식의 파일 테이블에 넣기
.import test.csv table
반응형
'개발 관련 > sqlite' 카테고리의 다른 글
[Sqlite3] FK가 동작하지 않을때? (0) | 2023.12.15 |
---|