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, 3674🔥, 0💬
Popular Posts:
How To Create a Table Index in Oracle? If you have a table with a lots of rows, and you know that on...
How To Convert Character Strings into Numeric Values in SQL Server Transact-SQL? Sometimes you need ...
How To Start the Command-Line SQL*Plus in Oracle? If you Oracle server or client installed on your w...
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...
How To Concatenate Two Character Strings Together in SQL Server Transact-SQL? Concatenating two char...