Top "Identity-column" questions

An Identity column is a column in a database table that is made up of values managed by the server and cannot be modified, to be used as a primary key for the table.

In Entity Framework, getting the value of an identity column after inserting

I'm using EF4. I want to insert a new MyObject into the database. MyObject has two fields: Id: int (Identity) …

entity-framework identity-column
SQL Server -- Any way to add a column and make it first column in table?

I'm altering an existing table to add an Identity column. That I can do, no problem. But I'm wanting to …

sql sql-server alter-table identity-column
IDENTITY_INSERT is set to OFF?

Here is my script of my db , CREATE TABLE [dbo].[MyTable]( [ID] [int] IDENTITY(1,1) NOT NULL, [Code] [nvarchar](25) NULL, [Name] […

sql-server identity-column
Changing Identity Seed in SQL Server (Permanently!)

Is there any way of changing the identity seed for an identity column permanently? Using DBCC CHECKIDENT just seems to …

sql-server seed identity-column
ORA-32795: cannot insert into a generated always identity column

Guys I am trying to execute below insert statement and I keep getting the error: cannot insert into a generated …

sql oracle oracle12c identity-column
SQL Server inserting huge number of rows to a table with default values and identity column in it

I need to insert about 6400000 rows a table with 2 columns CREATE TABLE [DBName].[DBO].[BigList] ( [All_ID] [int] identity(1,1) NOT …

sql-server sql-server-2008 insert identity-column
Reset Identity column to zero in SQL Server?

How can I reset the Identity column of a table to zero in SQL Server? Edit: How can we do …

c# sql-server linq-to-sql identity-column
SQL Set IDENTITY Field Using Variable

All, I want to start the numbering of an IDENTITY field based on the current maximum obtained from another table. …

sql-server-2008 tsql dynamic-sql identity-column
SQL Identity with leading padded zeros

I have marked a column as Identity in my table create table Identitytest( number int identity(1,001) not null, value varchar(500) ) …

sql sql-server padding identity-column
Linq to SQL - How to find the value of the IDENTITY column after InsertOnSubmit()

I am using LINQ to SQL to insert simple data into a table WITHOUT a stored procedure. The table has …

sql linq linq-to-sql identity-column