Possible Duplicate:
SQL Table Aliases - Good or Bad?
I've been maintaining and extending a somewhat convoluted multi-website application in PHP for nearly two years now. Whilst some major pieces have been upgraded or re-written, there are still huge swathes that haven't been touched since before I started. Many of the previous developers liked creating very domain-specific queries, often with lots of JOIN
s. And always with table aliases that are often not consistent across multiple queries.
In my experience, using table aliases is a false saving. When typing an ad-hoc query, it might save some keystrokes. But in an application with scads of semi-obscure queries and no coherent system for aliasing tables, I personally find them a hindrance to understanding the query. So I don't use them (except when they're necessary, such as self-joins).
What are other people's experiences?