If i have one transaction say mainTransaction, within this
mainTransaction i have another two transaction say t1 and t2.
Now while execution t1 completes successfully and commit
statement fires, but while executing t2 some error occurs
and rollback statement fires.
What happen to t1, is it rollback or not?
Answer Posted / candorz
BEGIN TRANSACTION
GO
BEGIN TRANSACTION
INSERT INTO [JSSKDB].[dbo].[JobsDb_Countries]
([CountryName])
VALUES
('something')
GO
COMMIT
GO
BEGIN TRANSACTION
INSERT INTO [JSSKDB].[dbo].[JobsDb_Countries]
([CountryName])
VALUES
('something1')
ROLLBACK
GO
For the above transaction the rollback will undo any changes made by the previous sub-transaction i.e. no change will be seen in the DB
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Do you know what is fill factor and pad index?
What are the basic functions for master, msdb, model, tempdb and resource databases?
What is transaction server distributed transaction?
What does indexation mean?
Explain why variables called the most powerful component of ssis?
what purpose does the model database serve? : Sql server database administration
what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?
Name three of the features managed by the surface area configuration tool? : sql server security
How to test odbc dsn connection settings?
What are xml indexes?
Any one plz send me SQL Server Developer/DBA resume for 4 years experience
What is index, cluster index and nonclustered index?
How to create new tables with "select ... Into" statements in ms sql server?
How to create indexed view?
What are the different types of cursor?