sir i used this SP but Not autoincement
ALTER PROCEDURE dbo.AutoIncrement(@EmpName varchar(25),@Fathername varchar(25),@Address nvarchar(50),
@Phone nvarchar(12),
@Sex varchar(8),
@MaterialStatus varchar(10))
as
Declare @AEmpId int
select @AEmpId=count(EmpId)from TblEmpReg
IF(@AEmpId='0')
BEGIN
SET @AEmpId='1'
END
SELECT @AEmpId=max(@AEmpId)+1 FROM TblEmpReg
Insert into TblEmpReg(EmpId,EmpName,Fathername,Address,Phone,sex,MaterialStatus)values(@AEmpId,@EmpName,@Fathername,@Address,@Phone,@sex,@MaterialStatus)
Anonymous User
15-Mar-2011Hello Pawan.
Please check this link. This might be useful for you.
http://www.mindstick.com/Blog/133/Auto%20increment%20id%20by%20using%20stored%20procedure