On 13 Sep 2011, at 4:38pm, Tim Streater wrote:

> In general the row could get moved around any number of databases and then 
> back to the original one.

That's one reason I think making absid unique then manually manipulating absid 
values is a bad idea.  Labelling which system each row originated in, and 
including that column in the unique key, is enough for you to avoid all 
collisions.  Then you no longer have to worry about changing any absids: leave 
the absid exactly as it is.  Move your rows from one database file to another 
with a simple INSERT, never worrying about changing anything in the record.

SQLite will use its own internal 'rowid' for unique row numbering and your app 
need never care about them.

> Here's a simple question. If I do this:
> 
>    insert into dst.messages select * from src.messages
> 
> do the databases as represented by src and dst have to have the same schema, 
> or merely the same number of columns?

I believe the latter.  Five columns will be copied into five columns in column 
order, regardless of column names.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to