On Sat, May 16, 2009 at 5:22 PM, James Gregurich <bayouben...@mac.com> wrote:
> howdy!
>
> Questions:
>
>
> suppose tables t1 & t2 exits in two separate db files, d1 & d2
> respectively. t1 & t2 have identical schemas, but different data.
>
> I want to append t2 to t1.
>
>
> I suppose the way to do that is to open a connect to d1, use the
> attach command to reference d2.t2 and issue a  "INSERT INTO t1 SELECT
> * FROM d2.t2;" query.
>
>
> Is that correct?

yes

> Is there a better way?

no, maybe, but why should you care... well, because...

>
> Is this operation inefficient or pitfalls any pitfalls to watch out for?

primary keys. You want to ensure that the combined table has unique keys.


>
>
> -James
>
>
>
>
>


-- 
Puneet Kishor http://www.punkish.org/
Carbon Model http://carbonmodel.org/
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org/
Science Commons Fellow, Geospatial Data http://sciencecommons.org
Nelson Institute, UW-Madison http://www.nelson.wisc.edu/
-----------------------------------------------------------------------
collaborate, communicate, compete
=======================================================================
Sent from Karlstad, Sweden
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to