I've stopped using aliases in the SQL I write and it's dramatically increased the clarify. From this style guide, the aliases section would look like this in my style guide: SELECT first_name FROM staff JOIN students ON students.mentor_id = staff.staff_num;
How do you know which table first_name came from? Also aliasing can be as much for legibility as anything. SELECT ZZ.first_name FROM staff AS ZZ INNER JOIN students AS Q ON Q.mentor_id = ZZ.staff_num;
SELECT
staff.first_name
FROM staff
INNER JOIN students ON student.mentor_id = staff.staff_num;
Whether or not you agree on the exact number [0], humans have limited working memory and aliases that don't group up concepts use it up unnecessarily.[0] https://en.m.wikipedia.org/wiki/The_Magical_Number_Seven,_Pl...