Click here to Skip to main content
15,888,351 members
Home / Discussions / Database
   

Database

 
GeneralRe: What happens with auto-incremented value on rollback? Pin
Jörgen Andersson30-Jan-13 7:37
professionalJörgen Andersson30-Jan-13 7:37 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Shameel30-Jan-13 3:15
professionalShameel30-Jan-13 3:15 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 5:45
piticcotoc30-Jan-13 5:45 
AnswerRe: What happens with auto-incremented value on rollback? Pin
i.j.russell30-Jan-13 4:37
i.j.russell30-Jan-13 4:37 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 5:41
piticcotoc30-Jan-13 5:41 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Mycroft Holmes30-Jan-13 11:44
professionalMycroft Holmes30-Jan-13 11:44 
GeneralRe: What happens with auto-incremented value on rollback? Pin
PIEBALDconsult31-Jan-13 3:40
mvePIEBALDconsult31-Jan-13 3:40 
AnswerRe: What happens with auto-incremented value on rollback? Pin
gvprabu20-Feb-13 23:02
gvprabu20-Feb-13 23: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,
SQL
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 18:33
LloydA11129-Jan-13 18:33 
AnswerRe: Book recommendation for learning SQL Pin
Jörgen Andersson30-Jan-13 0:52
professionalJörgen Andersson30-Jan-13 0:52 
AnswerRe: Book recommendation for learning SQL Pin
i.j.russell30-Jan-13 4:34
i.j.russell30-Jan-13 4:34 
AnswerRe: Book recommendation for learning SQL Pin
Simon_Whale30-Jan-13 5:46
Simon_Whale30-Jan-13 5:46 
AnswerRe: Book recommendation for learning SQL Pin
Corporal Agarn30-Jan-13 6:33
professionalCorporal Agarn30-Jan-13 6:33 
AnswerRe: Book recommendation for learning SQL Pin
gvprabu20-Feb-13 23:09
gvprabu20-Feb-13 23:09 
QuestionCan we delete old records from aspstatetempsessions table? Pin
manikantaer29-Jan-13 17:43
manikantaer29-Jan-13 17:43 
AnswerRe: Can we delete old records from aspstatetempsessions table? Pin
thatraja4-Oct-13 20:46
professionalthatraja4-Oct-13 20:46 
Questioncontrol AVG cost and close stock Pin
kornkimhour29-Jan-13 15:13
kornkimhour29-Jan-13 15:13 
AnswerRe: control AVG cost and close stock Pin
thatraja4-Oct-13 20:50
professionalthatraja4-Oct-13 20:50 
QuestionMySQL Table Lock Question Pin
Richard Andrew x6429-Jan-13 12:46
professionalRichard Andrew x6429-Jan-13 12:46 
AnswerRe: MySQL Table Lock Question Pin
Jörgen Andersson30-Jan-13 10:34
professionalJörgen Andersson30-Jan-13 10:34 
QuestionSQL Update Pin
mrfalk29-Jan-13 11:24
mrfalk29-Jan-13 11:24 
AnswerRe: SQL Update Pin
PIEBALDconsult29-Jan-13 11:47
mvePIEBALDconsult29-Jan-13 11:47 
GeneralRe: SQL Update Pin
mrfalk29-Jan-13 12:07
mrfalk29-Jan-13 12:07 
AnswerRe: SQL Update Pin
Michael Potter29-Jan-13 11:50
Michael Potter29-Jan-13 11:50 
GeneralRe: SQL Update Pin
PIEBALDconsult29-Jan-13 11:59
mvePIEBALDconsult29-Jan-13 11: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.