Few Important Points reg Joins
Qualifying Ambiguous Column Names :- Use table prefixes to qualify column names that are in multiple tables
- Use table prefixes to improve performance
- Use column aliases to distinguish columns that have identical names but reside in different tables
- Do not use aliases on columns that are identified in the USING clause and listed elsewhere in the SQL statement
Using Table Aliases :- Use table aliases to simplify queries
- Use table aliases to improve performance
SELECT e.empno, e.ename, d.loc, deptno FROM emp e JOIN dept d USING (deptno) ;
No comments:
Post a Comment