Click here to Skip to main content
13,795,356 members
   

Database

 
GeneralRe: What happens with auto-incremented value on rollback? Pin
Jörgen Andersson30-Jan-13 8:37
protectorJörgen Andersson30-Jan-13 8:37 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Shameel30-Jan-13 4:15
professionalShameel30-Jan-13 4:15 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 6:45
memberpiticcotoc30-Jan-13 6:45 
AnswerRe: What happens with auto-incremented value on rollback? Pin
i.j.russell30-Jan-13 5:37
memberi.j.russell30-Jan-13 5:37 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 6:41
memberpiticcotoc30-Jan-13 6:41 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Mycroft Holmes30-Jan-13 12:44
memberMycroft Holmes30-Jan-13 12:44 
GeneralRe: What happens with auto-incremented value on rollback? Pin
PIEBALDconsult31-Jan-13 4:40
protectorPIEBALDconsult31-Jan-13 4:40 
AnswerRe: What happens with auto-incremented value on rollback? Pin
gvprabu21-Feb-13 0:02
membergvprabu21-Feb-13 0:02 
Hi,

I think You are asking about "IDENTITY" Property in SQL Server right. If you will use IDENTITY while creating table, It will Increment Automatically based on your Starting value and Increment.

For Example,
CREATE TABLE #T1 (ID INT NOT NULL IDENTITY(1,1), Name VARCHAR(12))
INSERT INTO #T1(Name) VALUES('A')
SELECT * FROM #T1

BEGIN TRAN T1
    INSERT INTO #T1(Name) VALUES('B')
    ROLLBACK  TRAN T1

INSERT INTO #T1(Name) VALUES('C')
SELECT * FROM #T1


So Once Identity values is Incremented, In case If Transaction Roll backed also you will get next value only.

Regards,
GVPrabu.
QuestionBook recommendation for learning SQL Pin
LloydA11129-Jan-13 19:33
memberLloydA11129-Jan-13 19:33 
AnswerRe: Book recommendation for learning SQL Pin
Jörgen Andersson30-Jan-13 1:52
protectorJörgen Andersson30-Jan-13 1:52 
AnswerRe: Book recommendation for learning SQL Pin
i.j.russell30-Jan-13 5:34
memberi.j.russell30-Jan-13 5:34 
AnswerRe: Book recommendation for learning SQL Pin
Simon_Whale30-Jan-13 6:46
professionalSimon_Whale30-Jan-13 6:46 
AnswerRe: Book recommendation for learning SQL Pin
Corporal Agarn30-Jan-13 7:33
professionalCorporal Agarn30-Jan-13 7:33 
AnswerRe: Book recommendation for learning SQL Pin
gvprabu21-Feb-13 0:09
membergvprabu21-Feb-13 0:09 
QuestionCan we delete old records from aspstatetempsessions table? Pin
manikantaer29-Jan-13 18:43
membermanikantaer29-Jan-13 18:43 
AnswerRe: Can we delete old records from aspstatetempsessions table? Pin
thatraja4-Oct-13 21:46
protectorthatraja4-Oct-13 21:46 
Questioncontrol AVG cost and close stock Pin
kornkimhour29-Jan-13 16:13
memberkornkimhour29-Jan-13 16:13 
AnswerRe: control AVG cost and close stock Pin
thatraja4-Oct-13 21:50
protectorthatraja4-Oct-13 21:50 
QuestionMySQL Table Lock Question Pin
Richard Andrew x6429-Jan-13 13:46
professionalRichard Andrew x6429-Jan-13 13:46 
AnswerRe: MySQL Table Lock Question Pin
Jörgen Andersson30-Jan-13 11:34
protectorJörgen Andersson30-Jan-13 11:34 
QuestionSQL Update Pin
mrfalk29-Jan-13 12:24
membermrfalk29-Jan-13 12:24 
AnswerRe: SQL Update Pin
PIEBALDconsult29-Jan-13 12:47
protectorPIEBALDconsult29-Jan-13 12:47 
GeneralRe: SQL Update Pin
mrfalk29-Jan-13 13:07
membermrfalk29-Jan-13 13:07 
AnswerRe: SQL Update Pin
Michael Potter29-Jan-13 12:50
memberMichael Potter29-Jan-13 12:50 
GeneralRe: SQL Update Pin
PIEBALDconsult29-Jan-13 12:59
protectorPIEBALDconsult29-Jan-13 12:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.181207.3 | Last Updated 11 Dec 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid