LoginSignup
2
1

More than 5 years have passed since last update.

Oracle Database でリテラルの文字列配列をTABLEファンクションでレコードとして返す。

Posted at

文字列配列のTYPE定義⇒TABLEファンクションでイケるやで彡(゚)(゚)

CREATE OR REPLACE TYPE tp_v_array IS TABLE OF VARCHAR2(4000);
/

SELECT * FROM TABLE(tp_v_array('a', 'b', 'c', 'xxx', 'ZZZ'));

結果は以下の通り。

SQL> CREATE OR REPLACE TYPE tp_v_array IS TABLE OF VARCHAR2(4000);
  2  /

Type created.

SQL> SELECT * FROM TABLE(tp_v_array('a', 'b', 'c', 'xxx', 'ZZZ'));

COLUMN_VALUE
--------------------------------------------------------------------------------
a
b
c
xxx
ZZZ

SQL>

あら^~~ちょっとオシャレわね~~彡(癶)(癶)

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1