ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Deterministic function

Deterministic function

原创 Linux操作系统 作者:dragondb 时间:2019-03-06 09:45:05 0 删除 编辑

当用户在FBI中使用自定义函数时须加关键字:deterministic,就是说必须使用deterministic function……


SQL> create table test as select * from all_objects;

Table created.

SQL> create or replace function f_lower(name varchar2) return varchar2 as

2 begin

3 return lower(name);

4 end;

5 /

Function created.

SQL> create index test_idx on test(f_lower(object_name));

create index test_idx on test(f_lower(object_name)) *

ERROR at line 1:

ORA-30553: The function is not deterministic

SQL> create index test_idx on test(f_lower(object_name));

create index test_idx on test(f_lower(object_name))

*

ERROR at line 1:

ORA-01450: maximum key length (3118) exceeded

SQL> create index test_idx on test(substr(f_lower(object_name),1,30));

Index created.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/45259/viewspace-134881/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: system change number
请登录后发表评论 登录
全部评论

注册时间:2003-05-05

  • 博文量
    98
  • 访问量
    94093