巷尾的酒吧

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            64 Posts :: 0 Stories :: 5 Comments :: 0 Trackbacks
          select t.empno,nvl(t.mgr,'MGR') from emp t where t.deptno in (select s.deptno from dept s where s.deptno='1')
          select t.empno,nvl(t.mgr,'MGR') from emp t where exists (select s.deptno from emp s where s.deptno='1' and t.deptno=s.deptno)
          select t.empno,nvl(t.mgr,'MGR') from emp t where t.deptno is not null and exists (select s.deptno from emp s where s.deptno='1' and t.deptno=s.deptno)
          select t.empno,nvl(t.mgr,'MGR') from emp t where not exists (select s.* from dept s where s.deptno  in(2,3) and t.deptno=s.deptno)
          select t.empno,nvl(t.mgr,'MGR') from emp t where t.deptno in (select s.deptno from dept s where s.deptno not in(2,3))































          posted on 2012-10-11 13:31 abing 閱讀(186) 評論(0)  編輯  收藏 所屬分類: sql

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 昌宁县| 兴文县| 平乡县| 洪江市| 双牌县| 岢岚县| 贵定县| 迁安市| 彭州市| 临漳县| 石狮市| 神农架林区| 安陆市| 惠东县| 江门市| 商河县| 富阳市| 兴国县| 榆树市| 离岛区| 德令哈市| 盐池县| 林芝县| 大邑县| 天台县| 南开区| 当雄县| 东阿县| 台南市| 贵港市| 泰州市| 共和县| 邹平县| 达日县| 翁源县| 贵南县| 绥棱县| 临颍县| 和政县| 左权县| 余江县|