SQL supports column classification by prefixing a reference with the fully qualified table name:
SELECT tbl_names.id, tbl_section.id, name, section FROM tbl_names JOIN tbl_section ON tbl_section.id = tbl_names.id
... or table alias:
SELECT n.id, s.id, n.name, s.section FROM tbl_names n JOIN tbl_section s ON s.id = n.id
Table Alias - Recommended Approach - Why Enter More Than You Need?
Why do these queries look different?
Secondly, my answers use the ANSI-92 JOIN syntax (your ANSI-89). While they do the same, the ANSI-89 syntax does not support OUTER connections (RIGHT, LEFT, FULL). The ANSI-89 syntax should be considered obsolete, many of the SOs that will not vote for the ANSI-89 syntax to reinforce this. For more information see this question .
OMG Ponies Jul 10 2018-11-11T00: 00Z
source share