Since I’m sure many people have different standard, I’ve made this post a community wiki.
My question is, what’s a good naming scheme for table aliases? I’ve been using the first letter of every word from the table name, but it’s been getting quite unreadable. Here’s a quick example.
FROM incidents i FROM cause_attack ca FROM obscure_table ot
Thank you.
The whole point of an alias is to shorten the name so you don’t need verbosity.
It only needs to be unique within a given query, so there’s no need for a scheme for naming them.
Edit: Also, the aliases you’d use depend highly on the table naming scheme. If all your tables have a 5-part name where the first 4 are common across a query, it’s silly to keep those parts in the aliases.