On 20 Mar 2019, at 00:35, Simon Davies wrote:
> On Tue, 19 Mar 2019 at 15:07, Tim Streater wrote:
>>
>> My use case is a mixture of these. My need is to copy a row from a table in
>> one db (db1) to a table with identical schema in another db (db2). The
>> complication is that there is an id
On Tue, 19 Mar 2019 at 15:07, Tim Streater wrote:
>
> My use case is a mixture of these. My need is to copy a row from a table in
> one db (db1) to a table with identical schema in another db (db2). The
> complication is that there is an id column, so the row needs to get a new id
> in db2.
>
On 19 Mar 2019, at 13:46, R Smith wrote:
> Three ways in SQL to create and fill a table with data from another:
>
> 1. CREATE ... AS
> Example:
> CREATE TABLE newTable AS SELECT a,b,c FROM oldTable;
> 2. CREATE TABLE + INSERT
> Example:
> CREATE TABLE newTable(a INT, b REAL, c TEXT);
> INSERT
Wow! Thanks. I did not know these choices. Now I do. ;-)
From: sqlite-users on behalf of R Smith
Sent: Tuesday, March 19, 2019 09:46 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] INSERTing from another table data
I see the "ignore this" retraction, but
I see the "ignore this" retraction, but I thought to mention the
following any way, for future reference:
Three ways in SQL to create and fill a table with data from another:
1. CREATE ... AS
Example:
CREATE TABLE newTable AS SELECT a,b,c FROM oldTable;
(This method has the advantage of being
Ignore this. Sorry. I should always count to 10 before sending things.
Apologies.
From: sqlite-users on behalf of
Jose Isaias Cabrera
Sent: Tuesday, March 19, 2019 09:15 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: [sqlite] INSERTing from another
Greetings.
I have this table,
create table a (a, b, c);
insert into a values (1, 2, 3);
insert into a values (2, 3, 4);
insert into a values (3, 4, 5);
insert into a values (4, 5, 6);
insert into a values (5, 6, 7);
insert into a values (6, 7, 8);
and I also have this table,
create
7 matches
Mail list logo