Updating sql proceedure best dating site profiles women
When you first create your stored procedures it may work as planned, but how to do you modify an existing stored procedure.
In this topic we look at the ALTER PROCEDURE command and it is used.
The following example is for creating a simple update stored procedure.
You can run it through an explicit call from a host language program or directly from a DBMS query execution shell like SQL Server Management Studio or db Orchestra.
These SPs process the Insert, Update and Delete queries with or without parameters and return data of rows as output.
User defined stored procedure can take input parameters and return output parameters.
User defined stored procedure is mixture of DDL (Data Definition Language) and DML (Data Manipulation Language ) commands.
CREATE PROCEDURE dbo.sp_Students_UPD_by PK @active_flg TINYINT = NULL , @student_id INT AS BEGIN SET NOCOUNT ON UPDATE dbo.
Students SET active_flg = ISNULL(@active_flg , active_flg) FROM dbo.