Wayne
Wayne

Reputation: 681

Does it delete partially if execute a delete statement without transaction?

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?

Upvotes: 3

Views: 431

Answers (2)

gbn
gbn

Reputation: 432471

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.

Upvotes: 7

daniel.herken
daniel.herken

Reputation: 1105

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

Upvotes: 3

Related Questions