I know we can generate row_number in select statement. But row_number starts from 1, I need to generate from 2 and onwards.
Current I am using below select statement for generate regular row number.
How can modify above select statement and start from 2?
ROW_NUMBER() has an unusual syntax, and can be confusing with the various
PARTITION BY clauses, but when all is said and done it is still just a function with a numeric return value, and that return value can be manipulated in the same way as any other number.
I don't know much about SQL Server but either one of these will work: