日期:2014-5-17 浏览次数:20231次

|| 运算符问题
CREATE OR REPLACE FUNCTION FNCDVAL
(
  xCdGrp in varchar2,
  xCdKey in varchar2
)
return varchar2
as
  nCdVal tb_gnr_cd.cd_val%type;
begin

  select cd_val
  into nCdVal
  from tb_gnr_cd
  where tb_gnr_cd.cd_id = xCdGrp || xCdKey
  ;

  return nCdVal;
end;

这段代码中 “||” 的意思是什么?

------解决方案--------------------
连接符
SQL> select 'aa'||'bb' from dual;

'AA'
----
aabb