SQL Keyword - EXEC

EXEC Keyword

The Exec keyword is used to execute a stored procedure.

When you want to run any stored procedure, the execute keyword is used.

Syntax

EXEC <PROCEDURE_NAME>;

Example

EXEC GetAllMaleEmployee;

Execute a parameterized stored procedure

Syntax

EXEC <PROCEDURE_NAME> <PARAM1>,<PARAM2>..<PARAMN>;

Example

EXEC GetEmployeeFromGender 'Female';

Summary

The Exec keyword is used to execute a stored procedure.

Next Recommended Reading Top Keyword in SQL