Click here to Skip to main content
15,899,679 members
Home / Discussions / Database
   

Database

 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Jörgen Andersson30-Jan-13 1:04
professionalJörgen Andersson30-Jan-13 1:04 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 3:02
piticcotoc30-Jan-13 3:02 
GeneralRe: What happens with auto-incremented value on rollback? Pin
R. Giskard Reventlov30-Jan-13 5:33
R. Giskard Reventlov30-Jan-13 5:33 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 5:43
piticcotoc30-Jan-13 5:43 
GeneralRe: What happens with auto-incremented value on rollback? Pin
Simon_Whale30-Jan-13 5:49
Simon_Whale30-Jan-13 5:49 
GeneralRe: What happens with auto-incremented value on rollback? Pin
R. Giskard Reventlov30-Jan-13 5:55
R. Giskard Reventlov30-Jan-13 5:55 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 21:43
piticcotoc30-Jan-13 21:43 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Eddy Vluggen30-Jan-13 22:50
professionalEddy Vluggen30-Jan-13 22:50 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 23:17
piticcotoc30-Jan-13 23:17 
NewsRe: What happens with auto-incremented value on rollback? Pin
Eddy Vluggen31-Jan-13 3:16
professionalEddy Vluggen31-Jan-13 3:16 
GeneralRe: What happens with auto-incremented value on rollback? Pin
R. Giskard Reventlov31-Jan-13 5:18
R. Giskard Reventlov31-Jan-13 5:18 
GeneralRe: What happens with auto-incremented value on rollback? Pin
PIEBALDconsult30-Jan-13 10:29
mvePIEBALDconsult30-Jan-13 10:29 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 22:09
piticcotoc30-Jan-13 22:09 
GeneralRe: What happens with auto-incremented value on rollback? Pin
pmpdesign30-Jan-13 19:46
pmpdesign30-Jan-13 19:46 
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 

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.