oracle 问题,我就想知道,这种语法叫什么??不是方法,也不函数

是这样的,想请问下,oracle 问题,我就想知道,这种语法叫什么??不是方法,也不函数
最新回答
懵蓝初梦

2024-10-16 16:56:04

split应该是你自定义的一个函数,

table是oracle的一个函数,具体你自己看看(如果不全,你自己百度):

PL/SQL表---table()函数用法
/*

PL/SQL表---table()函数用法:
利用table()函数,我们可以将PL/SQL返回的结果集代替table。
oracle内存表在查询和报表的时候用的比较多,它的速度相对物理表要快几十倍。

simple example:

1、table()结合数组:

*/

create or replace type t_test as object(
id integer,
rq date,
mc varchar2(60)
);

create or replace type t_test_table as table of t_test;

create or replace function f_test_array(n in number default null) return t_test_table
as
v_test t_test_table := t_test_table();
begin
for i in 1 .. nvl(n,100) loop
v_test.extend();
v_test(v_test.count) := t_test(i,sysdate,'mc'||i);
end loop;
return v_test;
end f_test_array;
/

select * from table(f_test_array(10));
select * from the(select f_test_array(10) from dual);