how write bellow cod in C#
DECLARE @totalcount INT
DECLARE @count VARCHAR(50)
SELECT @totalcount=(SELECT COUNT(UserId) FROM Users) /*This one is used to return total number of records in table */
IF @totalcount IS NULL /*Condition to check whether totalcount contains value or not*/
SET @count='08U1'+CONVERT(VARCHAR(50),3000)
ELSE
SET @count='08U1'+CONVERT(VARCHAR(50), 3000+(@totalcount))
INSERT INTO Users (UserId,UserName,LastName,Location) VALUES(@count,'SureshDasari','Dasari','Chennai')