On 10 Jul 2014 at 14:17, Mark Lawrence <no...@null.net> wrote: > On Thu Jul 10, 2014 at 01:52:00PM +0100, Tim Streater wrote: >> >> What I'm actually doing is moving/copying a row from one database to >> another, where the two databases have identical schemas. >> ... >> >> So there are two copy steps. What I'd like to do is: >> >> ... >> >> but unfortunately there could easily be a conflict in the absid >> values, so I have to be able to set it to null to get a new value >> generated. > > You were almost there. You can do it in one go if you specify the > columns exactly: > > INSERT INTO dst.messages (col1,col2,col3) SELECT col1,col2,col3 FROM > main.messages WHERE absid = some_value;
Sure, but then it's another place in the code where I have to enumerate the columns explicitly, a maintenance problem. -- Cheers -- Tim
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users