T-SQL 101: 125 Executing Stored Procedures in SQL Server Using T-SQL
In T-SQL, the way we execute a stored procedure is to use the EXECUTE statement. We can write it as EXECUTE or as EXEC. You’ll almost always see it written as EXEC.
In the first example above, I’ve executed a stored procedure called dbo.GetCinemaChanges. Note that I’ve included the dbo schema in the name of the procedure. For procedures like this, you should always include the schema name.
The procedure also takes one parameter called @CurrentDate and set it to the 28th February 2012.
2025-03-06