SHOW CREATE PROCEDURE
Warning
SingleStore 9.0 gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
On this page
Shows the definition, procedure body, and other attributes for a stored procedure.
Refer to Permissions Matrix for the required permission.
Syntax
SHOW CREATE PROCEDURE [database_name.]procedure_name
Example
The following example shows the definition of a stored procedure named courses_
SHOW CREATE PROCEDURE dbExample.courses_sp \G
Procedure: courses_sp
sql_mode: STRICT_ALL_TABLES,NO_AUTO_CREATE_USER
Create Procedure: CREATE OR REPLACE PROCEDURE `courses_sp`(course_code text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, section_number int(11) NULL, number_students int(11) NULL) RETURNS void DEFINER = 's2user'@'%' AS
DECLARE
code TEXT = UCASE(course_code);
num_students INT = number_students + 1;
BEGIN
INSERT INTO courses VALUES (code, section_number, num_students);
END;
character_set_client: utf8
collation_connection: utf8mb4_general_ci
Last modified: May 29, 2025