리눅스, 자료실, 성경검색, 추억의게임, 고전게임, 오락실게임, rootman, http://www.rootman.co.kr
* 3.214.184.250 *
| Home | Profile | Linux | 자료실 | zabbix | Mysql 5.6 | 갤러리 | 성경검색 | 해피니스 | 자유게시판 | 게시물검색 | L | O | R |    

 
[sqlite] [sqlite3] command, 외부로 import/export하기
 작성자 : rootman
Date : 2011-12-12 20:24  |  Hit : 4,632  
[export 구문]
[[email protected] ~]# saff_server_count.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> .mode list
sqlite> .separator |
sqlite> .output /tmp/coolho.txt
sqlite> SELECT uid,I_date, Contents FROM staff_user_server_count;
sqlite> .exit

[[email protected] ~]# cat /tmp/coolho.txt
835|2012-03-11|692,618,74
836|2012-03-12|692,618,74
837|2012-03-13|692,618,74
838|2012-03-14|692,618,74
839|2012-03-15|692,618,74
840|2012-03-16|692,618,74
841|2012-03-17|692,618,74
842|2012-03-18|692,618,74


[import 구문]
sqlite>
CREATE TABLE UserServerCount (
       'uid'INTEGER PRIMARY KEY AUTOINCREMENT,
       'I_date'DATE,
       'Contents'TEXT
);

[[email protected] ~]# sqlite3 staff_user_server_count.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> SELECT * FROM UserServerCount;
sqlite> .separator |
sqlite> .import /tmp/coolho.txt UserServerCount

sqlite>
sqlite> SELECT * FROM UserServerCount limit 5;
835|2012-03-11|692,618,74
836|2012-03-12|692,618,74
837|2012-03-13|692,618,74
838|2012-03-14|692,618,74
839|2012-03-15|692,618,74




 
 

Total. 19
번호 분류 제목 작성자 등록일 조회수
19 sqlite [sqlite3] 날짜와 시간 함수 알아보기 rootman 12-14 10570
18 sqlite [sqlite3] command, DB 전체를 dump export, dump import 하기 rootman 12-12 5034
17 sqlite [sqlite3] command, 외부로 import/export하기 rootman 12-12 4633
16 sqlite [sqlite] 유용한 함수들 rootman 11-22 6986
15 sqlite [sqlite] 반올림, 버림, 올림 함수 rootman 11-22 10781
14 sqlite [sqlite] I deleted a lot of data but the database file did n… rootman 10-28 4364
13 sqlite [sqlite] How do I add or delete columns from an existing tab… rootman 10-28 4353
12 sqlite [sqlite] Collation Sequence Examples rootman 10-28 4608
11 sqlite [sqlite] Assigning Collating Sequences from SQL rootman 10-28 4434
10 sqlite [sqlite] Collating Sequences rootman 10-28 4265
9 sqlite [sqlite] Sorting, Grouping and Compound SELECTs rootman 10-28 4361
8 sqlite [sqlite] Operators rootman 10-28 4252
7 sqlite [sqlite] Comparison Example rootman 10-28 4376
6 sqlite [sqlite] Type Conversions Prior To Comparison rootman 10-28 4408
5 sqlite [sqlite] Affinity Of Comparison Operands rootman 10-28 4434
 1  2  
AND OR