可以的:
SQL> create or replace function f (n positive) return integer is
2 begin
3 if n = 1 then
4 return 1;
5 else
6 return n * f(n - 1);
7 end if;
8 end f;
9 /Function createdSQL> select f(10) from dual; F(10)
----------
362880010的阶乘呵呵、好像for win2k的也可以装xp上吧,我没试过。
SQL> create or replace function f (n positive) return integer is
2 begin
3 if n = 1 then
4 return 1;
5 else
6 return n * f(n - 1);
7 end if;
8 end f;
9 /Function createdSQL> select f(10) from dual; F(10)
----------
362880010的阶乘呵呵、好像for win2k的也可以装xp上吧,我没试过。
naturaln 0..2147483647 not null
positive 1..2147483647
positiven 1..2147483647 not null
signtype -1,0,1
那么2维的数组可不可以声明,可以动态的说明一个数组的长度,比如
a(i),i是一个变量,谢谢回答,我再提个问题再送分给大家!
TYPE t_Numbers IS TABLE OF NUMBER
INDEX BY BINARY_INTEGER;
-- Now declare a type which is an index-by table of t_Numbers.
-- This is a multilevel collection.
TYPE t_MultiNumbers IS TABLE OF t_Numbers
INDEX BY BINARY_INTEGER;
v_MultiNumbers t_MultiNumbers;
begin
v_MultiNumbers(1)(1) := 12345;
end;
/