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 |
What is better - 2nd Normal form or 3rd normal form? Why?
Explain linked server in sql?
What are cursors? Name four types of cursors and when each one would be applied?
Can you tell me about the concept of ER diagrams?
is there more the two primary key in a single table?
26 Answers Eforce, Systematix,
How to create new tables with "create table" statements in ms sql server?
What is trigger in salesforce?
When columns are added to existing tables, what do they initially contain?
How many databases instances are there in sql server 2000?
What is use of attribute hierarchy optimized state? : sql server analysis services, ssas
why would you use sql agent? : Sql server database administration
What is the difference between for auto and for nested?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)