ITeye博客

ORACLE函数传入TYPE参数

leon1509 · 2012-05-11 18:32 · Oracle · function · type · 数据库 · Oracle · function · type · Markdown


SQL> create type test_type as object(a varchar2(10),b number);
  2  /
 
Type created
 
SQL> 
SQL> create or replace function fun_test(a in test_type) return number is
  2  aa number;
  3  begin
  4    aa := a.b + 1;
  5  return aa;
  6  end;
  7  /
 
Function created
 
SQL> select fun_test(test_type('xx', 3)) from dual;
 
FUN_TEST(TEST_TYPE('XX',3))
---------------------------
                          4


评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。