alter a table column and set identity from max existing in that column in sql server 2008 -


i have column maxcode name, in mytable filled before,now want alter column , set type identity start max number existing in column maxcode

use below code reset seed value identity column

declare @newseed numeric(10) select @newseed = max(maxcode) mytable dbcc checkident (mytable, reseed, @newseed) 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

c# - Can I intercept a SOAP response in .NET before a content type binding mismatch ProtocolException? -

css - Can I use the :after pseudo-element on an input field? -