I\'ve got a strange situation with some tables in my database starting its IDs from 0, even though TABLE CREATE has IDENTITY(1,1).
This is so for some tables, but not for ot
DECLARE @c TABLE (TanvtechId varchar(10),NewTanvtechId Varchar(10))
INSERT INTO @c
SELECT TanvtechId , Row_Number() OVER (ORDER BY TanvtechId ) from Tanvtech
UPDATE G
SET G.TanvtechId =a.NewTanvtechId
FROM Tanvtech as G INNER JOIN @c as a ON a.TanvtechId =G.TanvtechId