plsql多表关联导出数据问题记录

       最近使用plsql多表关联查询满足条件的数据,最终导出符合条件的单表数据,如下所示:

      

select e.*
  from  emp e,dept p
 where 1 = 1
   and e.deptno = p.deptno
   and p.dname in('SALES','Manager')

    查询员工表满足部门为SALES和Manager的数据,导出

   

    结果如下

   

    很正常,但是如果emp(员工表)没有放在from的后面,如下所示

    

select e.*
  from  dept p,emp e
 where 1 = 1
   and e.deptno = p.deptno
   and p.dname in('SALES','Manager')

    导出结果为

   

    dept 表结构如下

   

    可以看到,plsql导出的表名直接取了from后面最接近的表名,但字段名是正确的

    很有意思,为什么会这样,暂时不知道,欢迎指教,谢谢

    全文完

  

猜你喜欢

转载自53873039oycg.iteye.com/blog/2051455