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
|
#!/bin/bash
db_name=test.db
tableName=collation
sqlite3 $db_name << EOF
DROP TABLE IF EXISTS ${tableName};
CREATE TABLE IF NOT EXISTS ${tableName} (
key CHAR not NULL,
value CHAR );
PRAGMA synchronous=OFF;
PRAGMA count_changes=OFF;
PRAGMA journal_mode=MEMORY;
PRAGMA temp_store=MEMORY;
BEGIN TRANSACTION;
INSERT INTO ${tableName} ( key, value) values ( "test_01", "테스트 1");
INSERT INTO ${tableName} ( key, value) values ( "test_04", "테스트 01");
INSERT INTO ${tableName} ( key, value) values ( "test_07", "테스트 001");
INSERT INTO ${tableName} ( key, value) values ( "test_02", "테스트 2");
INSERT INTO ${tableName} ( key, value) values ( "test_08", "테스트 002");
INSERT INTO ${tableName} ( key, value) values ( "test_05", "테스트 02");
INSERT INTO ${tableName} ( key, value) values ( "test_09", "테스트 003");
INSERT INTO ${tableName} ( key, value) values ( "test_03", "테스트 3");
INSERT INTO ${tableName} ( key, value) values ( "test_06", "테스트 03");
COMMIT TRANSACTION;
EOF
|