Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.
create procedure getConsumerID @outvar char(9) OUTPUT as declare @ConsumerID int begin transaction select @ConsumerID = fnPartID from tblParticipantNo if @ConsumerID is null begin set @ConsumerID = 1 insert into tblParticipantNo values(@ConsumerID) end else begin update tblParticipantNo set fnPartID=@ConsumerID + 1 end Select @ConsumerID set @outvar=@ConsumerID commit transaction
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.