Clausula With | Novedades Oracle 12c
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
-- Para leer explicación ir a http://arbo.com.ve/2016/02/19/sentencia-with-novedades-oracle-12c/ | |
WITH | |
FUNCTION sumar(valor1 in number, valor2 in number) RETURN number IS | |
BEGIN | |
RETURN valor1 + valor2; | |
END; | |
SELECT sumar(a,b) suma from ( | |
SELECT 23 a, 51 b from dual | |
UNION ALL | |
SELECT 87 a, 21 b from dual | |
UNION ALL | |
SELECT 123 a, 45343 b from dual | |
) temp; | |
-- Resultados | |
-- SUMA | |
-- ----- | |
-- 74 | |
-- 108 | |
-- 45466 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment