Create proc [dbo].[sp_insert]
@id int,
@FirstName varchar(50),
@LastName varchar(50),
@Email varchar(50),
@City varchar(50)
as
begin
if @id=1
begin
insert into jkarthik.dbo.reddy(FirstName,LastName,Email,City) values(@FirstName,@LastName,@Email,@City)
end
if @id=2
begin
select * from jkarthik.dbo.reddy
end
if @id=3
update jkarthik.dbo.reddy set City=@City where Email=@Email
end