I am trying to write a stored procedure in openGauss database, but I am getting an error message: ORA-00933: SQL command not properly ended. Here is the code:
CREATE OR REPLACE PROCEDURE get_employee_details
IS
BEGIN
SELECT employee_name, employee_id, salary
FROM employee;
END;
I am trying to write a stored procedure in openGauss database, but I am getting an error message: ORA-00933:
I tried put your stored procedure into a .sql file and ran it as follows.
As you can see it was successful and the stored procedure can be listed.
You probably don't want to be using a stored procedure for this though as it will not return any rows. Try the following instead: