SQL 创建一个更新的存储过程

来源:百度知道 编辑:UC知道 时间:2024/05/12 16:31:01
建一个显示表WorkerInfo,第一个参数 表示性别,第二个参数表示工资.

--建表
Create table WorkerInfo
(
ID int identity(1,1) parmary key,
Sex varchar(4),
Sallary int
)
--update存储过程
Create proc pr_Update_WorkerInfo
(
@id int
@Sex varchar(4),
@Sallary int
)
as
update WorkerInfo set Sex=@Sex and Sallary=@Sallary where id=@id