4.Which two statements are true regarding single row functions? (Choose two.)

4.Which two statements are true regarding single row functions? (Choose two.)
A.They accept only a single argument.
B.They can be nested only to two levels.
C.Arguments can only be column values or constants.
D.They always return a single result row for every row of a queried table.
E.They can return a data type value different from the one that is referenced.
答案:DE
解析:这里考察的是单行函数,单行函数的意思是同时只能对一行进行操作,并且对于输入的每一行返回一行输出结果
A.错误,这里说的是只能有一个参数,nvl2,replace,nvl等等都不止一个参数
B.错误,这里说的是只能嵌套2次,这个也是错误的,应该是没有限制,下面的例子循环了2万次,还是可以的
declare 
  tsql clob := 'nvl(1,1)';
  s integer := 10;
begin
  for s in 1 .. 20000 loop
      tsql := 'nvl('||tsql||',1)';
  end loop;
  tsql := 'select '||tsql||' from dual'; 
  execute immediate tsql into s;
  dbms_output.put_line(to_char(s));
end;
C.错误,这里说的是参数只能是列值和常量,也可以是变量或者select表达式
D.正确
E.正确,他们能够返回与参数不一样的数据类型,to_char这种函数,或者length或者month_between这种







  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值