In this article, I will give you information about parameterized procedures with the help of an example.
1 2 3 4 5 | create procedure parameterized (d1 text,d2 text ) language SQL as $$ insert into veliler(adi,soyadi ) values (d1,d2 ); $$; |
Using the d1 and d2 parameters above, we created a procedure that adds data to the adi and soyadi columns in the veliler table.
We will use the “call” command to run the procedure.
1 | call parameterized ('abdullah','arslan') |
Let’s check whether data has been added to our table by querying it.
Write a procedure that will perform the deletion from the veliler table with this procedure.