3

If the table myTable contains 100000000 records.

And I execute DELETE FROM myTable; without begin transaction and somethings go wrong, such as server power failure.

Will it delete some of the records?

shahkalpesh
  • 33,172
  • 3
  • 63
  • 88
Wayne
  • 681
  • 1
  • 6
  • 14

2 Answers2

7

No, if the DB engine conforms to ACID.

Any single write action is Atomic, whether contained in an explicit transaction or not.

A.k.a. each write action is a self contained transaction.

gbn
  • 422,506
  • 82
  • 585
  • 676
3

I would say no it will not delete partial, but without knowing the database server you use it's hard to tell.

daniel.herken
  • 1,095
  • 7
  • 19