SQL Server Question: autonumbering field

Dave

Perch
I'm just getting started with using SQL Server. Was thinking of converting my current MS Access web applications. One issue I've run into is all of my applications use an autonumber field to identify individual records. SQL Server does not appear to have an autonumber type. Does anyone know how I get the equivalent functionality with SQL Server?

Thanks for any help.
 
Dave said:
I'm just getting started with using SQL Server. Was thinking of converting my current MS Access web applications. One issue I've run into is all of my applications use an autonumber field to identify individual records. SQL Server does not appear to have an autonumber type. Does anyone know how I get the equivalent functionality with SQL Server?

Thanks for any help.
You can use the "identity" property in any bigint/int/smallint/tinyint field. If you use Enterprise Manager to design your database, just set the "identity" property to "yes". Then enter what number you want the field to start with in the "identity seed" property. Finally, enter the increment you want in the "identity increment" property. Hope this helps.
 
Thank you, Winnie. That was just the information I was looking for. I thought I was going to have to do a bunch of reprogramming to get things to work. Sounds like it will be smoother than I thought.

Thanks again!
 
Back
Top