identity-column Questions
2
Solved
How do you do multiple insert with SQL in Oracle 12c when you have an identity column?
INSERT ALL
INTO Table1 (Column2) Values (1)
INTO Table1 (Column2) Values (2)
SELECT * FROM dual;
where Tabl...
Villalobos asked 15/2, 2015 at 5:20
1
Solved
How do I return the value of an identity column (id) in Oracle 12c after insertion? Seems like most of the approaches out there uses sequence to get back the id of the inserted item.
Askwith asked 12/2, 2015 at 7:54
4
Solved
All, I want to start the numbering of an IDENTITY field based on the current maximum obtained from another table. So I have tried something like the following
DECLARE @CurrentES INT;
SET @CurrentE...
Lemures asked 24/7, 2012 at 11:31
6
Solved
How can I reset the Identity column of a table to zero in SQL Server?
Edit:
How can we do it with LINQ to SQL ?
Enumerate asked 19/12, 2010 at 19:31
2
Solved
I created a primary key to be autoincrement.
I added two rows: ID=1, ID=2
I deleted these two rows.
I added a new row, but the new row's ID was: ID=3
How can I reset or restart the autoincremen...
Farmyard asked 13/12, 2012 at 10:40
1
Solved
Oracle 12 introduced nice feature (which should have been there long ago btw!) - identity columns. So here's a script:
CREATE TABLE test (
a INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
b V...
Cornell asked 25/1, 2014 at 20:20
5
Solved
I need to insert about 6400000 rows a table with 2 columns
CREATE TABLE [DBName].[DBO].[BigList]
(
[All_ID] [int] identity(1,1) NOT NULL,
[Is_It_Occupied] [int] default(0) not null
)
I am us...
Mchenry asked 1/12, 2013 at 12:36
1
Solved
I have a matrix 10x4, and I have a vector that has 10 elements. Each element is an column index of that matrix that should be retrieved. Here is the example:
> M.mat
[,1] [,2] [,3] [,4]
[1,] ...
Lodicule asked 17/11, 2013 at 21:14
1
How to automatically generate identity for an Oracle database through Entity Framework?
I have a function that I could call and generate the column which is not in the context how do I explicitly ...
Strong asked 22/11, 2011 at 20:0
1
Solved
EDIT: the issue below has been fixed in the Entity Framework 6.
Running the code below takes a disappointing 2 minutes and 10 seconds. Running it a second time takes 6.5 minutes. This question is ...
Cabrera asked 8/2, 2013 at 8:20
3
Solved
We are migrating our MS-Access database to SQL Server Compact 4.0 using the Entity Framework 5 Code First approach. We found that using Database generated Integer ID's is very slow and to make it w...
Seoul asked 6/2, 2013 at 23:14
7
Solved
I'm using EF4. I want to insert a new MyObject into the database. MyObject has two fields:
Id: int (Identity) and
Name: string
As I've seen in documentation Entity Framework is supposed to set M...
Aluminium asked 10/6, 2011 at 13:2
1
Solved
I have 2 tables,
admin, pricing
admin contains columns (id, date_created, type, value)
pricing contains columns (id, date_created, relation, value)
I want to do a select that joins the two tab...
Durning asked 12/10, 2012 at 11:46
2
Solved
The default identifier generator for Postgresql in Hibernate is SequenceGenerator [1].
i.e. Hibernate will do SELECT nextval('hibernate_sequence') to generate an ID before doing an INSERT foo (id,...
Zealot asked 27/2, 2012 at 18:45
7
Solved
I have marked a column as Identity in my table
create table Identitytest(
number int identity(1,001) not null,
value varchar(500)
)
I need the identity column to be incremented as 001,002,003...
Tarpon asked 7/8, 2010 at 5:49
2
Solved
I am using EF4 in my C# project. The problem I'm faced with is that, when I try to save a record, I get a Primary Key Violation and the PK value is "0000-0000-0000-xxx". From my guess, EF does not ...
Manes asked 24/8, 2011 at 10:37
3
Solved
Can I use the
DBCC CHECKIDENT(<table_name>, RESEED, value)
command to reset an identity column current value to the original one in SQL Server 2008?
If yes, is this the correct way of do...
Asepsis asked 12/11, 2010 at 13:30
6
Solved
My two questions are:
Can I use clustered indexes to speed
up bulk inserts in big tables?
Can I then still efficiently use
foreign key relationships if my
IDENTITY column is not the clustered
ind...
Jewelfish asked 17/9, 2010 at 8:26
2
Solved
I try to load a table, that have an identity column, with DB Unit. I want to be able to set the id value myself (I don't want the database generate it for me).
Here is a minimal definition of my ...
Leeds asked 17/11, 2010 at 14:57
6
Solved
hey all. I have a table in my DB that has about a thousand records in it. I would like to reset the identity column so that all of the ID's are sequential again. I was looking at this but I'm ASSum...
Bentham asked 8/5, 2010 at 0:13
4
Solved
We have a legacy database which is a sql server db (2005, and 2008).
All of the primary keys in the tables are UniqueIdentifiers.
The tables currently have no clustered index created on them an...
Phobia asked 20/8, 2010 at 21:25
5
Solved
When adding an item in my database, I need it to auto-determine the value for the field DisplayOrder. Identity (auto-increment) would be an ideal solution, but I need to be able to programmatically...
Unfavorable asked 10/8, 2010 at 21:4
5
Solved
In other words, is the following "cursoring" approach guaranteed to work:
retrieve rows from DB
save the largest ID from the returned records for later, e.g. in LastMax
later, "SELECT * FROM MyTa...
Seaware asked 13/5, 2010 at 17:34
8
Solved
I have a .net transaction with a SQL insert to a SQL Server 2005 database. The table has an identity primary key.
When an error occurs within the transaction, Rollback() is called. The row insert...
Nolanolan asked 11/11, 2008 at 23:5
© 2022 - 2024 — McMap. All rights reserved.