Oracle联表查询语句用法

SELECT *
  FROM (SELECT R.*, s.StoreName, f.FactoryName, d.DepartmentName, rownum r
          FROM Resources R, Store s, Factory f, Department d
         WHERE rownum <= 6
           AND R.resourcename = '大容积水箱'
           and R.RESOURCESTORE = s.storeid
           and R.RESOURCEFACTORY=f.factoryid
           and R.RESOURCEBELONGTODEPT=d.departmentid)
 WHERE r > 0

posted on 2009-02-11 16:35  欣路历程  阅读(358)  评论(0编辑  收藏  举报

导航