I am trying to execute this Stored Procedure in Appian Maria DB and unable to check how to declare variable in Maria DB. Please let me know if any thoughts,
BEGIN DECLARE COUNT1 VARCHAR(1) DEFAULT 'S'; DECLARE CUR2 ROW TYPE OF SDP_TEST; DECLARE cur1 CURSOR FOR SELECT * FROM SDP_TEST; OPEN cur1; LOOP FETCH cur1 INTO CUR2; IF CUR2.id = 6 then UPDATE SDP_TEST SET id=8,name='Peter',address ='USA',job='Analyst'; SET COUNT1 ='Y'; END IF; end loop; IF COUNT1 != 'Y' THEN INSERT INTO SDP_TEST (id,name,address,job) VALUES (10,'PRIYANKA','AMERICA','Engineer'); COMMIT; END IF; close cur1; END
Discussion posts and replies are publicly visible
© 2023 Appian. All rights reserved.