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 / 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 |
is there a column to which a default can't be bound? : Sql server database administration
What is full outer join in sql server joins?
What are the types of lock supported by ?
How to find Duplicate Records In table?
how to write test cases for testing databases,especially for testing and writing test cases for stored procedures.any real time database testers.please answer me.
How do you find the number of rows in a table?
How to transfer an existing table from one schema to another schema in ms sql server?
UPDATE statement can on a single table or on the multiple table?
What is normalization and its types?
What is the use of stored procedure?
what purpose does OPENXML clause have in sql server stored procedure?
Can we use where and having clause together?