Programming in MS SQL Server 2012 |
EXECUTE Stored ProcedureThe Transact-SQL EXECUTE statement is used to execute a Stored Procedure. Execute System Stored Procedure System stored procedures begin with the prefix sp_. They logically appear in system and all user-defined databases; they can be executed from any database without having to fully quality the procedure name. Yet, schema-qualifying all system procedure names with the sys schema name to prevent name conflicts. The following example describes the recommended method of calling a system stored procedure. --
Example 99 -- EXEC sys.sp_who GO --
Example 100 -- EXEC EBusiness.dbo.usp_EmployeeList GO --
OR -- USE EBusiness GO EXEC dbo.usp_EmployeeList GO |
* * * * *