当用户在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/ ,如需转载,请注明出处,否则将追究法律责任。