1
  1. 我需要加入该子查询,因为它返回不止一行。
  2. 加入子查询看起来像(我不知道确切的语法):

    select * from some_pl_sql_function(id_arg)
    
  3. 我需要将它与 id_arg 加入,它是某个表的列。

  4. 该函数返回字符串数组。

最终版本应该看起来像(我猜):

select * from some_table
left outer join (select * from some_pl_sql_function(id_arg)) sub_query
    on some_table.id_arg = sub_query.id_arg

我应该在子查询中写什么才能使它起作用?

4

1 回答 1

1

如果您的arrayofstrings(函数的返回类型)是在模式级别定义的,即-

create or replace type arrayofstrings as table of varchar2(32767);

然后你可以像这样使用你的函数:

select id_arg, column_value from table(some_pl_sql_function(id_arg))
于 2012-07-04T08:49:25.290 回答