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 |
How do you delete a trigger?
What is Report Server,Report Manager and Report Builder in SSRS 2005?
In performance wise distinct is good or group by is good? eg:select name from emp group by name; select distinct name from emp;
What is the template in sql?
What are the instances when triggers are appropriate?
any one can explain Self mapping Delegation Remote Credentials
What are the properties of the transactions?
John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?
What are the different types of indexes?
What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?
How to loop through result set objects using mssql_fetch_array()?
mention different types of relationships in the dbms?