numberkruncher
asked on
Equivalent LEFT JOIN SQL?
A while back I asked a question which helped me to build the following (first) SQL statement. Out of interest. Could somebody tell me if both of the following statements are identical. Is the alias just for convenience, or could it alter the output in any way?
SELECT t1.* FROM user_group_link AS t2 LEFT JOIN user AS t1 ON t2.user_id = t1.id WHERE t2.group_id=[b]INPUT[/b]
SELECT user.* FROM user_group_link LEFT JOIN user ON user_group_link.user_id = user.id WHERE user_group_link.group_id=[b]INPUT[/b]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
in fact, if the colum names are unique to all tables, you do not even need the tablename.columnname, you can just put colum name. But this is not good practice.
ASKER
Thanks, I wasn't sure what the AS was giving an alias to the table name or whether it was giving a name to a set of results which had to be re-addressed.