usql
usql copied to clipboard
oracle procedure
Can you give an example of how a stored procedure is executed?
Executing a stored procedure is probably not possible at the moment. usql
can be used to define schemas, stored procedures, views, etc. on Oracle (simply escape ;
as \;
):
CREATE PROCEDURE a_0_in_1_out(a_return OUT INTEGER) AS
BEGIN
SELECT 10 INTO a_return FROM dual\;
END\;;
However, I am not sure if it's possible to actually call a stored procedure at the moment, as it requires creating/declaring variables for storing out values and then returning that. I'm not sure if the Go drivers in usql
(godror
and ora
) currently support this, in a way that would work with usql
. I'll try to see if I can figure out a way for this. For now, I'd suggest using sqlplus
if you need a command-line to retrieve values from a stored procedure.
Ok, thank you
Hello.
Any news about this?
We want to execute a procedure without variables.
Is it possible to just run this command:
exec procedure_name;
via usql?