My first job that required interacting with SQL regularly involved migrating tens of thousands of lines of legacy queries after dozens of columns and tables had been moved and renamed. This process took years. This process could have taken at most a couple of days had no one used table aliases (or at least avoided them when they were unnecessary).
Consider the following query.
on employee as a
inner join customers as b
left join transactions c
on c.transactionid = b.transactionid
Don't think too hard about it. I made it up and what it does isn't important. Just imagine you were told
transactions.last_name have moved to
transactions_table.lastname respectively. Meanwhile,
transactions_table is indexed on
transaction_datetime_id instead of
transactionid. Sure, you could spend a couple of minutes backtracking this new query and swapping out
transactions_table, the join involving
c.transaction_datetime_id, and finally
Now consider the following query.
inner join customers
on employee.transactionid = customers.transactionid
left join transactions
on transactions.transactionid = customers.transactionid
Now imagine making the same changes. It should be immediately clear you can just run a few blind regular expression based substitutions on the query.
I'm not the first person to encounter this problem and I won't be the last (the group I met at a company I joined later went through the same painstaking process).
If you want to blame me for being new to heavy SQL at the time, then please note that my predecessor was a 4 year full-time SQL veteran and was the same person that wrote these queries that needed updating. He was already a year into the process of migrating them when he left and I took over. Tremendous resources are wasted because of unnecessary table aliases. Seriously.