identity-column Questions
6
Solved
I suppose everyone runs into this problem once in a while: you have two tables that have autonumber primary keys that need to be merged. There are many good reasons why autonumber primary keys are ...
Parody asked 29/9, 2010 at 18:19
10
Solved
I need to have one column as the primary key and another to auto increment an order number field. Is this possible?
EDIT: I think I'll just use a composite number as the order number. Thanks anywa...
Wertz asked 8/12, 2008 at 10:28
21
Solved
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 sequential starting at 1,...
Cynth asked 26/6, 2009 at 13:41
6
Solved
I would like to learn how to fetch list of all tables that have identity columns from a MS SQL database.
Giavani asked 16/4, 2013 at 18:6
2
Solved
I am having some problem setting the Identity Seed on the Id column in SQL Compact 4 using the code first approach.
I have tried this
context.Database.ExecuteSqlCommand("DBCC CHECKIDENT ('Members...
Petaliferous asked 31/7, 2012 at 1:56
14
Solved
I want to create a list of columns in SQL Server 2005 that have identity columns and their corresponding table in T-SQL.
Results would be something like:
TableName, ColumnName
Litharge asked 17/9, 2008 at 21:15
6
Solved
I have a handful of raw SQL queries for SQL Server which use SCOPE_IDENTITY to retrieve the generated ID for a specific INSERT immediately after that INSERT occurs all in one execution…
INSERT int...
Elmoelmore asked 5/4, 2011 at 21:49
3
Solved
Is it possible to reseed an auto increment column in a SQLite database, and if so, how is this done?
ie. The equivalent of DBCC CHECKIDENT ('MyTable', RESEED, 1) in SQL Server.
Periclean asked 26/6, 2010 at 5:44
7
Solved
"There can only be one IDENTITY column per table"
Why is it so? Take a scenario of a vehicle, there exists a chasis number which is unique as well as the registration number which turns out to be ...
Spicebush asked 27/9, 2010 at 19:57
3
Solved
I'm setting up a identity column to my existing columns for the Patient table.
Here I would like to use GENERATED ALWAYS AS IDENTITY.
So I setup the identity column by using the following statemen...
Rapture asked 14/4, 2019 at 4:6
3
Solved
I have created a table with column S_ROLL NUMBER(3) NOT NULL Now I want to make this colum to as identity column.
I used this command
alter table students
modify
(
S_ROLL NUMBER GENERATED BY DEFAU...
Armful asked 24/1, 2016 at 6:20
4
Solved
Is there any way of changing the identity seed for an identity column permanently? Using DBCC CHECKIDENT just seems to set the last_value. If the table is truncated all values are reset.
dbcc chec...
Backtrack asked 26/1, 2010 at 13:48
9
Solved
I am trying to add bulk data in database from CSV file.
Employee table has a column ID (PK) auto-incremented.
CREATE TABLE [dbo].[Employee](
[id] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](...
Tactics asked 1/6, 2012 at 13:18
3
Solved
I have an Oracle 12c database with a table containing an identity column:
CREATE TABLE foo (
id NUMBER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
bar NUMBER
)
Now I want to insert into the tabl...
Dragster asked 12/11, 2015 at 15:37
3
Solved
Guys I am trying to execute below insert statement and I keep getting the error:
cannot insert into a generated always identity column
the statement is :
INSERT INTO leaves_approval
SELECT *...
Extraversion asked 22/12, 2016 at 4:42
3
alter table tablename rename column zl_divn_nbr to div_loc_nbr;
Error while executing the above statement. Please help.
SQL Error: ORA-54032: column to be renamed is used in a virtual column exp...
Selfabasement asked 10/5, 2018 at 20:6
3
Solved
I seem to remember in MySQL when truncating a table the auto incremented index field would continue where it left off. So if said table was truncated with the highest id was 100, the next id after ...
Acherman asked 1/7, 2013 at 15:47
6
Solved
In one of my tables Fee in column "ReceiptNo" in SQL Server 2012 database identity increment suddenly started jumping to 100s instead of 1 depending on the following two things.
if it is 1205446 ...
Isotherm asked 3/1, 2013 at 19:52
2
Solved
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 constraint from all tables from...
Darling asked 19/12, 2014 at 4:50
4
Solved
My database is getting old, and one of my biggest INT IDENTITY columns has a value around 1.3 billion. This will overflow around 2.1 billion. I plan on increasing it's size, but I don't want to do ...
Handout asked 5/1, 2012 at 16:12
5
Solved
Can I have an "identity" (unique, non-repeating) column span multiple tables?
For example, let's say I have two tables: Books and Authors.
Authors
AuthorID
AuthorName
Books
BookID
BookTitle
...
Escaut asked 11/3, 2010 at 20:4
3
Solved
I thought it was a bug but after reading this article http://www.codeproject.com/Tips/668042/SQL-Server-2012-Auto-Identity-Column-Value-Jump-Is, I found that it's a new feature of SQL Server 2012.
...
Issy asked 23/4, 2016 at 18:8
6
Solved
Is it easier to implement domain-driven design when using guids as identity fields instead of auto incrementing integers? With guids you don't have to jump to the database to get the actual value.
...
Jaela asked 21/11, 2009 at 15:29
3
I have a table in database Foo named Bar, that has a column named ID, which is the primary key, and this database is living on the development SQL Server.
I'm trying to copy data from our producti...
Giesser asked 27/6, 2013 at 16:1
5
Solved
I am currently developing an application for Azure Table Storage. In that application I have table which will have relatively few inserts (a couple of thousand/day) and the primary key of these ent...
Gaud asked 8/12, 2009 at 22:28
1 Next >
© 2022 - 2024 — McMap. All rights reserved.