Sunday 9 August 2020

How To Create A Simple Parameterized Stored Procedure In PostgreSQL And ...



Only 3.9% of viewers are subscribing to my channel 😓.
I request you to please give click on Subscribe button.
It really helps me grow 😢.




-- purpose is to create a simple parameterized stored procedure in postgreSQL

-- and call it using pgAdmin



CREATE TABLE public.testing (demo_column text);



CREATE OR REPLACE PROCEDURE public.testing_procedure(p_msg text)

LANGUAGE 'plpgsql'

AS $BODY$

DECLARE

BEGIN

INSERT into public.testing(demo_column) values(p_msg);

END;

$BODY$;



call public.testing_procedure('Hello Akram, We are watching Knowledge 360');



SELECT * from public.testing;

No comments:

Post a Comment