单项选择题
检查下列代码段中的脚本dates.sql:
为了使脚本正确工作,要改变哪个方面?()
A.变量v_hiredate应变成接受DATE信息。
B.查询中的trunc()函数应删除。
C.accept命令中的prompt子句是多余的。
D.这个脚本很好。
相关考题
-
单项选择题
用下列代码块回答问题:要在上述返回集的DEPTNO列中显示99,可以用下列哪个SQL语句?()
A.select p.prod_name,p.profit from (select prod_name,profit from profits order by profit desc)where rownum <=5;
B.select p.prod_name,p.profit from (select prod_name,sum(profit)from profits group by prod_name order by sum(profit)desc)subq where p.prod_name =subq.prod_name;
C.select p.prod_name,p.profit from (select prod_name,sum(profit)from profits group by prod_name order by sum(profit)desc)where rownum <=5;
D.select p.prod_name,p.profit from (select prod_name,sum(profit)from profits order by sum(profit)desc)where rownum <=5; -
单项选择题
用下列代码块回答问题:要在上述返回集的DEPTNO列中显示99,可以用下列哪个SQL语句?()
A.select nvl(e.deptno,99),e.ename,e.sal from emp e where (e.deptno,e.sal)=(select max(e2.sal)from emp e2where nvl(e.dept,99)=nvl(e2.deptno,99));
B.select nvl(e.deptno,99),e.ename,e.sal from emp e where e.sal =(select max(e2.sal)from emp e2where nvl(e.dept,99)=nvl(e2.deptno,99));
C.select nvl(e.deptno,99),e.ename,e.sal from emp e where (e.deptno,e.sal)=(select e2.deptno,max(e2.sal)from emp e2where nvl(e.dept,99)=nvl(e2.deptno,99));
D.select nvl(e.deptno,99),e.ename,e.sal from emp e where (e.deptno,e.sal)=(select e2.deptno,max(e2.sal)from emp e2where nvl(e.dept,99)=nvl(e2.deptno,99)group by e1.deptno); -
单项选择题
下列代码块显示的查询包含一个子查询:可以用下列哪个子句重新定义这个查询,删除子查询与主查询中组函数执行的重复?()
A.group by
B.order by
C.with
D.having