Hi PRA,
You just need to remember on what basis you need to increment the column value also if the column value is null and if you need to increment the value by any number then you need to handle it by ISNULL.
Check the below sample Query and try it in your code and implement it as per your own logic.
SQL
CREATE TABLE #Table (Id INT,Number INT)
INSERT INTO #Table (Id ,Number )
SELECT 1 ,101
UNION ALL
SELECT 2 ,102
UNION ALL
SELECT 3 ,103
UNION ALL
SELECT 4 ,201
UNION ALL
SELECT 5 ,202
UNION ALL
SELECT 6 ,203
UNION ALL
SELECT 7 ,301
UNION ALL
SELECT 8 ,302
UNION ALL
SELECT 9 ,303
UPDATE #Table
SET Number = ISNULL(Number,0) + 100
SELECT * FROM #Table
Output
Id |
Number |
1 |
201 |
2 |
202 |
3 |
203 |
4 |
301 |
5 |
302 |
6 |
303 |
7 |
401 |
8 |
402 |
9 |
403 |