Collections:
EXECUTE - Executing Stored Procedures in SQL Server
How To Execute a Stored Procedure in SQL Server Transact-SQL?
✍: FYIcenter.com
If you want execute a stored procedure created previously, you can use the EXECUTE statement in the following formats:
EXEC procedure_name; EXECUTE procedure_name;
The key word EXEC is actually optional. So you can execute a stored procedure by just entering the procedure name as the statement. See examples in the following tutorial exercise:
USE FyiCenterData; GO -- create a quick procedure CREATE PROCEDURE date AS PRINT CONVERT(VARCHAR(20),GETDATE(),107); GO -- execute with EXEC EXEC date; GO May 19, 2007 -- execute with EXEC date; GO May 19, 2007 -- using a reserved keyword as procedure name CREATE PROCEDURE datetime AS PRINT GETDATE(); GO datetime; GO May 19, 2007 11:35PM
Looks like SQL Server allows you to reserved keywords as stored procedure names.
⇒ sys.procedures - Listing All Stored Procedures in SQL Server
⇐ "CREATE PROCEDURE" - Creating Simple Stored Procedures in SQL Server
2017-01-05, 3688🔥, 0💬
Popular Posts:
How To Revise and Re-Run the Last SQL Command in Oracle? If executed a long SQL statement, found a m...
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...
How to check if two JSON values have overlaps using the JSON_OVERLAPS() function? JSON_OVERLAPS(json...
How to connect SQL Server Management Studio Express to SQL Server 2005 Express in SQL Server? Once y...
Can You Drop an Index Associated with a Unique or Primary Key Constraint in Oracle? You can not dele...