表emp(empno, empname, deptno)
表dept(deptno, dname, loc)
若用以下语句进行查询,则会报下图的错误
select d.* from (select * from emp, dept where emp.deptno = dept.deptno) d;
改为语句则能正确查询,原因是emp表与dept表存在重复的字段名
select d.*
from (select emp.empno, emp.empname, emp.deptno empdetno, dept.*
from emp, dept
where emp.deptno = dept.deptno) d;