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 to execute the cursor queries with "open" statements?
Is it possible to delete duplicate rows in a table without using a temporary table ?
What do you mean by normalisation?
What is the difference between char and varchar2 datatype in sql?
Write an SQL query to obtain the 2nd highest salary.
0 Answers Akamai Technologies,
How to get a list of columns in a view using the "sp_help" stored procedure?
You want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition?
What is Query Execution Plan? How does it help optimize or tune a database driven application?
What is a transaction and why is it important?
1.How to check the backup file details if we do not have access to that folder 2.how to check the backup file size without connecting to the folder
3 Answers CarrizalSoft Technologies, IBM,
What is merge?
How do you use DBCC statements to monitor various aspects of a SQL server installation?
Oracle (3253)
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)