-1

I want to delete a record which is inserted in the previous step inside one transaction.

The transaction is created without any isolation level defined.

Currently, no record is deleting by delete statement.

Stanislav Dontsov
  • 1,591
  • 11
  • 24
csharp coder
  • 19
  • 2
  • 4
  • 5
    Rollback the transaction? – Heretic Monkey May 06 '19 at 17:15
  • 2
    Don't commit the transaction *or* explicitly roll it back. If you want more help you will have to provide more context, preferably an [mcve]. – Igor May 06 '19 at 17:24
  • "Transaction is created without any isolation level defined" that is not possible actually, you just have some default isolation level. – Stanislav Dontsov May 06 '19 at 18:02
  • You could wrap this particular insert in a nested transaction and then cancel it, to understand if you are able to do that indicate what RDBMS you are using. – Stanislav Dontsov May 06 '19 at 18:09
  • What is the problem you have? You can insert and delete the row you just added in the transaction. See https://meta.stackoverflow.com/questions/333952/why-should-i-provide-an-mcve-for-what-seems-to-me-to-be-a-very-simple-sql-query for SQL related questions. – Progman May 06 '19 at 19:43

1 Answers1

0

begin trans

################################

insert your sql statement here

################################

rollback -- if you want to cancel your transactions
commit -- if you feel good about your transactions

Verse He
  • 97
  • 9