Add the USING clause : Table Join Basics « Table Joins « Oracle PL / SQL






Add the USING clause

    
create table department(
            dept_no                 integer      primary key
           ,dept_name               varchar(20)      not null
           ,mgr_no                  integer
);

create table employee(
         emp_no                 integer         primary key
        ,lastname               varchar2(20)    not null
         ,dept_no                 integer
);



select dept_name, lastname
from department inner join employee
using (dept_no);
  
drop table department;
drop table employee;
   
    
    
  








Related examples in the same category

1.The query shows that the join is performed with the other WHERE conditions
2.Adding an Analytical Function to a Query that Contains a Join (and Other WHERE Conditions)
3.Used a GROUP BY in a query with no ordering or analytical function
4.Adding Ordering to the Query Containing the GROUP BY
5.Supplying Table Aliases
6.Join table using
7.Join with a subquery
8.Get Categories and Products (with Alternate Join Syntax)
9.Get Categories and Products (with Joins)
10.Joining table to use between ... and clause
11.Nested Multi-Table Equi-Joins
12.How Many Featured Products By Department with JOINs
13.How Many Products By Department with JOINs
14.Non-Equi Joins