Can I have two Identity columns? If not, please solve below problem.
I
have two columns I need to auto-increment. One(ID) starts at 1, the
other(username) at 1000.
I'm performing a DTS import of roughly
11,000 records and want the two columns to increment along with the
import.
Loading
Sailaja YPosted Mar 29, 2010, 5:08 AM
In SQL Server, a table cannot have two identity columns.
But, you can almost reach the requirement by using the insert trigger.
When a insert is done for a table.Increment the username that starts from 1000 in the trigger and the other column can be a identity column.
If this helped you,please mark this as answer.
Regards,