数据库中的存储过程的问题
alter proc userinfoproc
@name varchar(20),
@pwd varchar(20),
@tablename varchar(20),
@tableIDname varchar(20),
@tableselewhere varchar(2000),
@tableID int,
@type int
as
begin
if(@type=0)
begin
insert into userinfo values(@name,@pwd);
end
else if(@type=1)
begin
select * from userinfo;
end
else if(@type=2)
begin
select * from userinfo where @tableIDname=@tableID;
end
else if(@type=3)
begin
delete from userinfo where @tableselewhere;
end
end
exec userinfoproc 'admin','admin','uid','uid',6,2
select * from userinfo