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