Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?



If i have one transaction say mainTransaction, within this mainTransaction i have another two trans..

Answer / 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

More SQL Server Interview Questions

What is identity?

0 Answers  


What is an identity?

0 Answers  


Why it is recommended to avoid referencing a floating point column in the where clause?

0 Answers  


Find nth lowest salary or get nth lowest salary?

0 Answers  


What is the purpose of the tempdb database?

0 Answers  


Diff. b/w Full Outer Join And Cross Join?

3 Answers  


What is difference between view and materialized view?

0 Answers  


Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?

0 Answers  


What new changes are being made in SQL Server?

0 Answers   Blue Star,


How to generate random numbers with the rand() function in ms sql server?

0 Answers  


How do I change my passwords (database, LDAP, and so on) without causing an outage?

0 Answers   IBM,


What is data source object?

0 Answers  


Categories