To do the stored procedure today, in the occasional thought of something,
That is, select can query for a single piece of data,
So why can't update?
Actually, it's okay.
After my special Niu Jiao Jian,
It's still out.
In QSL there is actually a query that is to use the update query a data,
Not much, just look at the code.
CREATE TABLE [dbo]. [Name] (---insert data after building table
[ID] [int] IDENTITY (1,1) not NULL,
[Name] [varchar] () not NULL,
[Age] [INT] Not NULL,
[Sex] [varchar] (ten) Not NULL,
[Shenggao] [INT] Not NULL,
[DESC] [varchar] (MB) Not NULL,
CONSTRAINT [Pk_name] PRIMARY KEY CLUSTERED
(
[ID] ASC
With (Pad_index = off, Statistics_norecompute = off, Ignore_dup_key = off, Allow_row_locks = on, allow_page_locks = ON) O N [PRIMARY]
) on [PRIMARY]
Go
DECLARE @ID int= ' 123456 '--number
DECLARE @C1 VARCHAR (50)--Specify the columns to be checked out
UPDATE [Name]
Set @C1 =[name]--fetch a column
WHERE id= @ID
Select @C1--Display column data
I'll test it out.