CREATE OR REPLACE FUNCTION fn1 (
p_input1 NUMBER
) RETURN NUMBER
AS
BEGIN
RETURN p_input1 * 2;
END;
/
SELECT
SUM(fn1(ROWNUM) )
FROM
dual
CONNECT BY
level <= 2000000;
-----------------------------------------------------
WITH
FUNCTION fn1 (
p_input1 NUMBER
) RETURN NUMBER
AS
BEGIN
RETURN p_input1 * 2;
END;
SELECT
SUM(fn1(ROWNUM) )
FROM
dual
CONNECT BY
level <= 2000000;
-----------------------------------------------------
CREATE OR REPLACE FUNCTION fn1 (
p_input1 NUMBER
) RETURN NUMBER
AS
PRAGMA UDF;
BEGIN
RETURN p_input1 * 2;
END;
/
SELECT
SUM(fn1(ROWNUM) )
FROM
dual
CONNECT BY
level <= 2000000;
-----------------------------------------------------
Well Explained
ReplyDeletehttps://computerbuyingsetup2020.wordpress.com/
Such A Great Informative article. Thanks for sharing it here. Also I created one website, Hope you will check it out also. This website is based on Sofa Reviews And Buying Guides. So check it out. Thanks. bestsofareview2020.wordpress.com
ReplyDelete