[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] Transfer data between databases
From:       "Simon Davies" <simon.james.davies () googlemail ! com>
Date:       2009-01-09 8:51:18
Message-ID: 11345fc30901090051j6fa385b2gee66fce3aed9a960 () mail ! gmail ! com
[Download RAW message or body]

2009/1/9 Pierre Chatelier <ktd@club-internet.fr>:
> Hello,
>
> This may be a question with a very short answer...
> I have two separate SQLite database files, but containing the same
> kind of tables. Is there a quick way to copy rows from one table of a
> file to the same table of the other file ?
> I suppose "no", and I will have to perform SELECT on one side and
> INSERT on the other. But since one of my column is a blob type, it is
> a little more pain than a simple string copy, because for performance
> I should have to handle the blob with the read/write functions. Right ?
>
> Anyway, are there tricks to know to make such a row transfert simple
> and efficient ?
>

Something like

 attach 'tst2.db' as db2;
 insert into db2.tbl1 select * from main.tbl1;

> Regards,
>
> Pierre Chatelier

Rgds,
Simon
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic