Hi Bill,

I'm not sure about the 'sqlite world', most of my sql work is done using a
different dbms, but my 'standard' is to always use alias names anytime I
have two or more tables in a SELECT.

Yes, it can make the sql longer and sometimes it is not strictly necessary
(as you say, only needed for column names  that are not unique), but I've
found that this makes large pieces of sql much easier to read -
particularly when you have to come back to them after a few months in order
to change something.

Cheers,
Dave


Ward Analytics Ltd - information in motion
Tel: +44 (0) 118 9740191
Fax: +44 (0) 118 9740192
www: http://www.ward-analytics.com

Registered office address: The Oriel, Sydenham Road, Guildford, Surrey,
United Kingdom, GU1 3SR
Registered company number: 3917021 Registered in England and Wales.


-----Original Message-----
From: [email protected]
[mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Drago,
William @ CSG - NARDA-MITEQ
Sent: 16 March 2015 16:17
To: General Discussion of SQLite Database
Subject: [sqlite] When to disambiguate column names in queries?

All,

Some of my Select statements are pretty long and I'm starting to think it'd
be a good idea to always include table names of columns instead of just when
they are not unique. This would make the Select statements longer, but
perhaps easier to understand if the reader knows where each column is from.

Any thoughts on this? I realize something like this can be highly
subjective, but I'm wondering if there's a generally accepted practice in
the SQLite world.

Thanks,
--
Bill Drago
Senior Engineer
L3 Narda-MITEQ<http://www.nardamicrowave.com/>
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / William.Drago at L-3COM.com<mailto:William.Drago at L-3COM.com>


CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any
attachments are solely for the use of the addressee and may contain
information that is privileged or confidential. Any disclosure, use or
distribution of the information contained herein is prohibited. In the event
this e-mail contains technical data within the definition of the
International Traffic in Arms Regulations or Export Administration
Regulations, it is subject to the export control laws of the U.S.Government.
The recipient should check this e-mail and any attachments for the presence
of viruses as L-3 does not accept any liability associated with the
transmission of this e-mail. If you have received this communication in
error, please notify the sender by reply e-mail and immediately delete this
message and any attachments.
_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to