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

IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do

0 Answers  


What is the difference Between Sql-server 2000 & 2005

3 Answers   Value Labs, Wipro,


What is a transaction and what are ACID properties?

14 Answers   Config Systems, IBM, TCS, Virtusa,


Why should you use or avoid select * statements?

0 Answers  


how many instance use in sql server 2005

4 Answers   EFI, HCL,


What is a Join in SQL Server?

3 Answers  


What is a constant or literal in ms sql server?

0 Answers  


What is stretch database in sql server?

0 Answers  


Explain Different types of Projects?

1 Answers  


How to provide Security for package?

1 Answers   Convergys,


What are the dmvs? : sql server database administration

0 Answers  


why would you call update statistics? : Sql server database administration

0 Answers  


Categories