The Using Clause specifies which columns to test for equality when two tables are joined.it can be used insted of an on clause in the join operation that have an explicit join clause.
Syntax:-
Using(simple-column name[,simple column name]*)
The Columns listed in the using clause mumst be present in both of two being joined.The USING clause will be transformed to an ON clause for equality between the
named columns in two tables.
For Example :- SQL> SELECT l.city, d.department_name
2 FROM locations l JOIN departments d USING (location_id)
3 WHERE location_id = 1400;
CITY DEPARTMENT_NAME
------------------------------ ------------------------------
Southlake IT
Syntax:-
Using(simple-column name[,simple column name]*)
The Columns listed in the using clause mumst be present in both of two being joined.The USING clause will be transformed to an ON clause for equality between the
named columns in two tables.
For Example :- SQL> SELECT l.city, d.department_name
2 FROM locations l JOIN departments d USING (location_id)
3 WHERE location_id = 1400;
CITY DEPARTMENT_NAME
------------------------------ ------------------------------
Southlake IT
0 comments:
Post a Comment
Thank you for your comments we will get back to soon