Skip to content

Instantly share code, notes, and snippets.

@phantom42
Last active December 14, 2015 20:38
Show Gist options
  • Save phantom42/5145002 to your computer and use it in GitHub Desktop.
Save phantom42/5145002 to your computer and use it in GitHub Desktop.
-- '1,2,3' is the list of ids we would be searching against
SELECT *
FROM table
WHERE id IN
(
SELECT REGEXP_SUBSTR('1,2,3','[^,]+', 1, level) from dual
CONNECT BY REGEXP_SUBSTR('1,2,3', '[^,]+', 1, level) is not null
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment