Created
February 19, 2014 14:34
-
-
Save phantom42/9093295 to your computer and use it in GitHub Desktop.
oracle "with as" subquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH typelist AS | |
(SELECT 0 AS n | |
FROM DUAL | |
WHERE 1 = 0 | |
UNION | |
SELECT 1 AS n | |
FROM DUAL | |
UNION | |
SELECT 2 AS n | |
FROM DUAL) | |
SELECT * | |
FROM personnel_type t | |
WHERE t.personnel_type_id NOT IN (SELECT n | |
FROM typelist); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment