To write debug and execute stored procedures in a database SQL Server you must use Query Analyzer (Query Analyzer). To create a new procedure, enter the word in the Query pane and press Ctrl + E to execute its definition. Attention understand that this action is that the procedure to attach the database but does not actually execute the stored procedure itself!
To execute a stored procedure you must run the following statement: EXECUTE :To create a new stored procedure and attach it to the database being you must use the CREATE PROCEDURE. The general syntax of the statement is as follows:
CREATE PROCEDURE:
Code:
CREATE PROCEDURE procedure_name AS
{
procedure definition
}
Procedure_name Where is the name of the new stored procedure and the block of statements following the keyword AS is the procedure body.
Bookmarks