Bo's Oracle Station

查看: 1498|回复: 0

第38次:2015-08-12 星期三

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2015-8-13 16:03:17 | 显示全部楼层 |阅读模式
  1. create table tunique ( a   number   unique ) ;

  2. insert into tunique values (1) ;

  3. insert into tunique values ( null) ;

  4. select  * from tunique;

  5. insert into tunique values ( null) ;


  6. select  * from employees   
  7.    where employee_id in ( select manager_id
  8.      from employees) ;

  9. select  * from employees   
  10.    where employee_id not  in ( select manager_id
  11.      from employees  where manager_id is not  null) ;
  12.      
  13.      
  14.   SELECT department_name || q'# Department's Manager Id: #'
  15.        || manager_id
  16.        AS "Department and Manager"
  17. FROM departments;
  18.    
  19.      

  20. SELECT   last_name, job_id, department_id, hire_date
  21. FROM     employees
  22. ORDER BY 3;

  23.      
复制代码

上完1Z0-051第0章        (52-24)
上完1Z0-051第1章        (52-25)
上完1Z0-051第2章        (52-26)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-26 06:52 , Processed in 0.041142 second(s), 24 queries .

快速回复 返回顶部 返回列表