Skip to content

Instantly share code, notes, and snippets.

@yasushiyy
Created July 2, 2014 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yasushiyy/12416365315594f3e6c1 to your computer and use it in GitHub Desktop.
Save yasushiyy/12416365315594f3e6c1 to your computer and use it in GitHub Desktop.
リストを表データとして取り出す(Oracle SQL)
select 1 from dual
union all
select 2 from dual;

とかやっている方へ。 リスト上のデータを、行データとしてアクセスする表関数があります。 商用で使うかは微妙ですが…

select *
  from table(sql_objects(1,2,3,4,5));
COLUMN_VALUE
------------
           1
           2
           3
           4
           5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment