Foenix
Foenix

Reputation: 558

Need to insert huge data into sqlite table from insert statement

I have got a statment like this

INSERT INTO 'tablename' ('column1', 'column2') VALUES
('data1', 'data2'),
('data1', 'data2'),
('data1', 'data2'),
('data1', 'data2');

But it contents a huge amount of data (about 100 000) (it was exported like this from other database). Does anybody know a way to insert this data into table? Any way will help. This is just one operation, not for program, etc.. All sqlite managers I use just hanged up.

I read here that sqlite does not support such statements, so may be I need a way to convert statement in something usable.. may be trought other DB type..

Upvotes: 1

Views: 179

Answers (1)

Atilla Ozgur
Atilla Ozgur

Reputation: 14721

Try to use .import command.

 .import FILE TABLE     Import data from FILE into TABLE

There is a HUGE speed difference between using individual sql statements and .import in sqlite.

Use pragma encoding Check the encoding of text in SQlite

Upvotes: 1

Related Questions