EXEC
Example
Section titled “Example”CREATE PROCEDURE MyProcedureASPRINT 'Hello World'GO
EXEC MyProcedureOutput
Section titled “Output”Hello WorldExplanation
Section titled “Explanation”The example demonstrates the use of EXEC command. First, we create a procedure named MyProcedure using CREATE PROCEDURE which prints ‘Hello World’. After that, we execute the procedure using the EXEC command. The output is the string ‘Hello World’ printed by the executed procedure.