In a t-sql 2012 listed below, I want the lockids to be set individually from 117173 to 117678. The problem with the sql listed below is all the lockid values end of with the values of 117678. Thus can you show me the sql on how to get each row value set to a unique value?
declare @LoopCounter int = 117172
While (@LoopCounter <= 117678)
set @LoopCounter = @LoopCounter + 1
where [schoolID] = 134