Bo's Oracle Station

查看: 1941|回复: 0

课程第10次(2017-03-18星期六晚)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-3-18 23:53:04 | 显示全部楼层 |阅读模式
上完1Z0-051第0/1/2章:关系型数据库,DQL和Where以及Order by
1Z0-051共12章(上完3章),1Z0-052共19章(上完3章),1Z0-053共21章(上完0章)
总共上完全部52章中的6章

  1. select  employee_id, department_name
  2. from employees e, departments d
  3.   where e.department_id=d.department_id;
  4.   
  5.   select  * from employees  e
  6.    where e.commission_pct  is not null;
  7.    
  8.    SELECT  last_name||' '||job_id AS "Employees" FROM   employees;
  9.    
  10.    
  11.    SELECT department_name || q'# Department's Manager Id: #'
  12.        || manager_id
  13.        AS "Department and Manager"
  14. FROM departments;


  15.   SELECT department_name || 'Department'||chr(39)||'s Manager Id: '
  16.        || manager_id
  17.        AS "Department and Manager"
  18. FROM departments;

  19. select  * from user_tab_columns
  20. where  table_name='EMPLOYEES' ;

  21. SELECT employee_id, last_name, salary, manager_id
  22. FROM   employees
  23. WHERE  manager_id  not IN (100, 101, 201, null) ;

  24. select  * from employees
  25. where employee_id not  in ( select manager_id from employees  where manager_id is not null);


  26. SELECT employee_id, last_name, salary*12 annsal
  27. FROM   employees
  28. ORDER BY  first_name;


  29. SELECT last_name, department_id, salary
  30. FROM   employees
  31. ORDER BY department_id desc, salary DESC;


  32. --
  33. SELECT employee_id, last_name, salary, department_id
  34. FROM   employees
  35. WHERE  employee_id = &s_1 ;






复制代码



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 09:56 , Processed in 0.040773 second(s), 24 queries .

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