我建了一个表如下
create table person(
pk_person int identity not null primary key,
pno varchar(20) unique not null,
name varchar(20) not null,
pk_corp int not null
)
go
我想创建一个更新的存储过程(不固定要修改那个字段的)这里应该怎么来写这个存储过程?新人求高人指教!
create table person(
pk_person int identity not null primary key,
pno varchar(20) unique not null,
name varchar(20) not null,
pk_corp int not null
)
go
我想创建一个更新的存储过程(不固定要修改那个字段的)这里应该怎么来写这个存储过程?新人求高人指教!
as
exec ('update tb set '+@column+'='''+@newvalue+''' where '+@where)