Home > database >  Essentially a column name as a parameter to identify the update
Essentially a column name as a parameter to identify the update

Time:10-24

USE [HR]
GO
/* * * * * * Object: StoredProcedure [dbo] [Pro_test] Script Date: 2020-10-23 18:59:30 * * * * * */
The SET ANSI_NULLS ON
GO
The SET QUOTED_IDENTIFIER ON
GO
-=============================================
Author: & lt; The Author, Name>
- the Create date: & lt; The Create Date,, & gt;
- Description: & lt; The Description, & gt;
-=============================================
The ALTER PROCEDURE [dbo] [Pro_test]
@ Daycode varchar (20)
AS
The BEGIN
SET NOCOUNT ON;
The update MANEXTRADAY set @ Daycode=12 where cod_emp='31248' and ym=the SUBSTRING (' 2020-10-21 08:00:00 '0, 8).
End

Then an EXEC [Pro_test] 21;
Found that the data did not change, before the value is null, or null, now have a great god can guide;
  • Related