About 910,000 results
Open links in new tab
  1. Reset identity seed after deleting records in SQL Server

    I have inserted records into a SQL Server database table. The table had a primary key defined and the auto increment identity seed is set to “Yes”. This is done primarily because in SQL …

  2. How to turn IDENTITY_INSERT on and off using SQL Server 2008?

    Setting the Identity Insert value and the subsequent Insert DML commands are to be run by the same session. Here @Beginner was setting Identity Insert ON separately and then running the …

  3. sql - Adding an identity to an existing column - Stack Overflow

    Jun 26, 2009 · 577 I need to change the primary key of a table to an identity column, and there's already a number of rows in table. I've got a script to clean up the IDs to ensure they're …

  4. How to update Identity Column in SQL Server? - Stack Overflow

    Oct 3, 2013 · You can not update identity column. SQL Server does not allow to update the identity column unlike what you can do with other columns with an update statement. Although …

  5. SQL Server add auto increment primary key to existing table

    7 This answer is a small addition to the highest voted answer and works for SQL Server. The question requested an auto increment primary key, the current answer does add the primary …

  6. sql - Remove [NOT FOR REPLICATION] from all Identity columns of ...

    Dec 19, 2014 · 6 I have a Database which is containing lot of tables with Identity columns set to [NOT FOR REPLICATION]. in SQL Server 2008 R2 Is there any way that I can remove this …

  7. sql server - How to automatically generate unique id in SQL like ...

    Dec 19, 2013 · I want to automatically generate unique id with per-defined code attach to it. ex: UID12345678 CUSID5000 I tried uniqueidentifier data type but it generate a id which is not …

  8. Auto-increment primary key in SQL tables - Stack Overflow

    Jul 29, 2010 · Using Sql Express Management Studio 2008 GUI (not with coding), how can I make a primary key auto-incremented? Let me explain: there is a table which has a column …

  9. sql - How to insert multiple records and get the identity value ...

    67 I'm inserting multiple records into a table A from another table B. Is there a way to get the identity value of table A record and update table b record with out doing a cursor?

  10. sql - How to identify whether the table has identity column - Stack ...

    I want to find out whether the table has an identity column or not. Table is unknown to me. I have not done the structure of the table. Using Query? I am using Sql Server Compact Edition.