Friday, September 11, 2009

SELECT CAN GO ANY WHERE

SELECT DECODE ((SELECT 'x'
FROM DUAL), (SELECT 'x'
FROM DUAL), (SELECT 'y'
FROM DUAL)) AS RESULT
FROM (SELECT 'm'
FROM DUAL)
WHERE (SELECT 1
FROM DUAL) = (SELECT 1
FROM DUAL)
AND (SELECT 2
FROM DUAL) BETWEEN (SELECT 1
FROM DUAL) AND (SELECT 3
FROM DUAL)
AND NVL ((SELECT NULL
FROM DUAL), (SELECT 'z'
FROM DUAL)) = (SELECT 'z'
FROM DUAL)
ORDER BY (SELECT 1
FROM DUAL);

No comments: