I need to understand how do we create stored procedure in Appian cloud DB.
Trying to execute following code in SQL tab from Appian cloud DB.
CREATE PROCEDURE caseCount(parm INT)BEGINSELECT COUNT(*) FROM `cases`;END //
It fails with following error.
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
Discussion posts and replies are publicly visible
Hi Abhay,
I think you have missed the creating definer & the direction of your variable IN or OUT
It would be worth going to CLOUD DATABASE>PROCEDURES>NEW and then try creating the procedure from the interface provided.
In the MySQL PHP interface you can just put the SPROC name as caseCount
add the variable parm
and then put the SPROC body as
BEGIN
SELECT COUNT(*) FROM `cases`;
END
Let me if you need more details.
Regards,
Kunal