set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Author:
-- Create date:
-- Description:
-- =============================================
ALTER PROCEDURE [dbo].[MyStoreProcedure]
-- Add the parameters for the stored procedure here
--<@Param1, sysname, @p1>
--<@Param2, sysname, @p2>
@Operation int,
@Parameter varchar(2),
@Uname varchar(10) ,
@Passoword int,
@RegisterStatus int,
@RegisterStatus1 int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
if @Operation=1
begin
Select * from ddc order by Uname
end
if @Operation=2
-- Insert statements for procedure here
begin
insert into ddc ([Uname],[Passoword],[RegisterStatus],[RegisterStatus1])values(@Uname,@Passoword,@RegisterStatus,@RegisterStatus1)
end
if @Operation=3
begin
delete from ddc where Uname=@Uname
end
if @Operation=4
begin
Update [ddc] set [Uname]=@Uname,[Passoword]=@Passoword,[RegisterStatus]=@RegisterStatus,[RegisterStatus1]=@RegisterStatus where ([Uname]=@Uname)
end
END
No comments:
Post a Comment