About 890,000 results
Open links in new tab
  1. Auto increment primary key in SQL Server Management Studio 2012

    Jun 12, 2012 · The MS SQL Server uses the IDENTITY keyword to perform an auto-increment feature. In the example above, the starting value for IDENTITY is 1, and it will increment by 1 …

  2. 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 …

  3. How do I add a auto_increment primary key in SQL Server database?

    I have a table set up that currently has no primary key. All I need to do is add a primary key, no null, auto_increment. I'm working with a Microsoft SQL Server database. I understand that it …

  4. sql - How to increment in a select query - Stack Overflow

    CREATE TABLE [SomeTable] ( [id] INTEGER, [order] INTEGER, PRIMARY KEY ([id], [order]) ); One way to get this in Microsoft SQL Server 2000 is to use a subquery to count the rows with …

  5. Sql Server Modificar columna para que sea autoincremental sin …

    Aug 30, 2022 · Tengo una tabla, en la cual existe un campo con valores generados por una aplicacion (autoincrementales). dicho campo, es del tipo INT. Necesito modificar este campo, …

  6. sql server - How can I make a SQL temp table with primary key …

    What am I missing here? I'm trying to get the ID field to be the primary key and auto increment so that I don't need to insert it explicitly. CREATE TABLE #tmp ( ID INT IDENTITY(1, 1) , …

  7. Add Auto-Increment ID to existing table? - Stack Overflow

    Feb 7, 2013 · In SQL Server 2008, replacing 'AUTO_INCREMENT' with 'IDENTITY (1,1)' worked for me.

  8. sql server - BULK INSERT with identity (auto-increment) column

    Next, connect to your DB using Microsoft SQL Server Management Studio and right click on your database and select import data (submenu under task). Select Microsoft Excel as source. …

  9. auto increment - Reset AutoIncrement in SQL Server after Delete

    Mar 10, 2021 · Additional info Before giving auto increment number in above query, you have to make sure your existing table's auto increment column contain values less that number. To get …

  10. Incrementar Id con un INSERT en SQL Server

    Aug 22, 2017 · AUTO_INCREMENT es para MySQL, y lo que el OP requiere es para SQL Server. En este caso lo que requiere es un IDENTITY(1,1)