Basic syntax question on qualified table names in a select. I've got 2 attached
databases, say db1 and db2, and I try to run...
insert into main.foo
select db1.foo.*
from db1.foo left outer join db2.bar
on db1.foo.pk = db2.bar.pk
where db2.bar.pk is null;
and I get "Error: near "*": syntax error
On 11/21/16, David Raymond wrote:
>
> Following the nice SQL diagrams it looks like in a select you can only have
> * or table-name.*, whereas in other places you can have
> schema-name.table-name. Granted, the second version can be made prettier and
> more readable, but I would have assumed the f
> And since the "*" forms are considered bad style
I have done this, not knowing it is bad style. Can you provide some reasons
why it is bad? I can assume, "Applications are supposed to be controlled
environments, and using tbl.* introduces uncertainty outside the
applications control." But are th
On 11/21/16, Don V Nielsen wrote:
>> And since the "*" forms are considered bad style
>
> I have done this, not knowing it is bad style. Can you provide some reasons
> why it is bad?
Years later when somebody does "ALTER TABLE ... ADD COLUMN" your
application will begin doing unnecessary work to
to:sqlite-users-boun...@mailinglists.sqlite.org] On
Behalf Of Richard Hipp
Sent: Monday, November 21, 2016 4:33 PM
To: SQLite mailing list
Subject: Re: [sqlite] Table name syntax
On 11/21/16, Don V Nielsen wrote:
>> And since the "*" forms are considered bad style
>
> I have done this, not kno
On Mon, 21 Nov 2016 20:46:45 +
David Raymond wrote:
> insert into main.foo
> select db1.foo.*
> from db1.foo left outer join db2.bar
> on db1.foo.pk = db2.bar.pk
> where db2.bar.pk is null;
Just by the way, your query could be cast as
insert into main.foo
select *
from db1.foo where not e
6 matches
Mail list logo