On Thu, Aug 15, 2019 at 2:53 PM Keith Medcalf <kmedc...@dessus.com> wrote:

>
> Using AS to name columns means NOT using *.  One only uses * when one does
> not care about column names (or the ordering of the result columns).
>

Sounds like a personal gospel.

This is closer to the test case....
(yes it doesn't make a lot of sense without the additional wheres and other
context, but the structure is closer to what I'd have)

 select count(*)count,* from ( select count(*)count,* from addresses join
users on users.address_id=addresses.id ) address join pets pet on
pet.user_id='address.user.id';

from a test driven development viewpoint, I want to see what's available
Then I can later refine the query.

Second though, Providing the ability to get table alias I can make queries
that reference different tables in reality but appear to have the same
results as other queries.

The query itself does a pretty good job of defining the structure of the
data itself even with *.





>
> --
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to