How to i make a procedure in PostgreSQL using IF-statements and a print? | SoloLearn: Learn to code for FREE!

0

How to i make a procedure in PostgreSQL using IF-statements and a print?

CREATE OR REPLACE PROCEDURE number_students() LANGUAGE 'plpgsql' AS $BODY$ BEGIN IF (SELECT COUNT(student_id) FROM student) IF (number > 25) THEN SET MESSAGE_TEXT = 'enough students'; COMMIT; END; $BODY$; CALL number_students();

10/24/2020 4:03:40 PM

W. Khalid

0 Answers

New Answer