Home Forums SQL Server 2005 Development Unexpected result of appending records to a table in SQL 05 RE: Unexpected result of appending records to a table in SQL 05

  • There is no such thing as a record number in SQL Server.

    You can set an identity property for a column, and it will autoincrement based on settings, but there is no guarantee for these to be contiguous or gaps to be filled. You can get the current identity value with the ident_current() function (http://msdn.microsoft.com/en-us/library/ms175098.aspx)

    If you want to insert specific values, you would need to use SET IDENTITY_INSERT and specify the values in your insert statement.