Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have to insert ID starting from "1" in one column , i have to change that ID to "1"
if the year changes .

please give suggestions or solution.
Posted

1 solution

Not a big deal. Store ID, Year in seperate columns & generate MAX ID based on year.
Here check this for reference
Custom Auto-Generated Sequences with SQL Server[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900