Monday, June 30, 2014

Multi Stored Procedute

USE [naresh]
GO

/****** Object:  StoredProcedure [dbo].[sp_getgridvalues]    Script Date: 06/30/2014 13:04:30 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[sp_getgridvalues] 
@id int,
@type varchar(50)

as
begin
if(@type='Byid')

select id,name,address from gridsession where id=@id
else
select * from gridsession
end

GO