.sql语句的编程手册 SQL PLUS(2)

2019-04-09 20:17

中有,而在销售部中没有? select job from account minus select job from sales; 子查询 slect ename,deptno from emp where deptno= (select deptno from emp where ename=smith); 多级子查询 select ename,job,sal from emp where job= (select job from emp where ename=clark) or sal> (select sal from emp where ename=clark); 多个基表和子查询 select ename,job,sal from emp,dept where loc=new york and emp.deptno=dept.deptno and sal> (select sal from emp where ename=scott); 子查询中使用聚组函数 select ename,hiredate from emp where hiredate= (select min(hiredate) from emp); ------------ 8 授权 系统权限 DBA 所有权限 RESOURCE 注册,创建新的基表 CONNECT,注册,查询 只有DBA才有权创建新的用户 grant connect to scott identified by tiger; DBA或用户自己能改动用户口令 grant connect to scott identified by leopard; 基表权限comm order by sal desc,ename; 列出有关雇员姓名、奖金占收百分比的信息。 需求显示时列名意义明确,按雇员姓名排序,不包括奖金未知的雇员。 select ename employee,(comm/(comm+sal))*

href=\where comm is not null order by ename; 在chicago(部门30)工作的所有雇员的工资上涨

href=\ where deptno=(select deptno from dept where loc=chicago); 为hitech公司新建一个部门,编号为50,其他信息均不可知。 insert into dept(dname,deptno) values(faclities,50); 创建视图,三个列名,其中不包括职员信息 create view employee(\name\ \number\ \job\ as select ename,empno,job from emp where job!=clerk; 制作工资报表,包括雇员姓名、受雇时间(按星期计算),工资和部门编号, 一页显示一个部门的信息,每页尾,显示该页的

工资之和及受雇时间之和, 报表结尾处,显示所有雇员的工资总和及受雇时间总和, 工资按美元计算,受雇时间按星期计算,每页的上方应有标题。 ttitle service break on deptno on page on report compute sum of sal on deptno compute sum of sal on report compute sum of service_length on deptno compute sum of service_length on report column sal format $99,999.00 column service_length format 9999 select deptno,ename employee,(sysdate-hiredate)/7 service_length,sal from emp order by deptno; 制作报表,包括雇员姓名、总收入和受佣日期, 且:姓名的第一个字母必须大写,雇佣日期格式为MM/DD/YYYY, 总收入包括没有奖金的雇员的总收入,姓名按字母顺序排列。 col \date\A7); 列出所有面积大于等于日本的岛国的国名和人口。 select nation,population from nation,border where code=nation_code(+) and nation_code is null and area>= (select area from nation where upper(nation)=JAPAN); 列出所有边界在其他国家中的国名,并且显示其边界国家名字。 break on nation select nation

nation2.nation borderin_country from nation nation

href=\字符型、数字型表达式中的空值 null+<数字>=null(空值加数字仍是?) Related articles:


.sql语句的编程手册 SQL PLUS(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:Android与iPhone的对比

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: