coffee_machine
coffee_machine

Reputation: 1223

Add a column and populate it in a single transaction with Sql Server

I'm making an update script for a given data base. The script must

The script must either succeed or fail AND leave the database unchanged.

My idea was to do it in a single transaction, but I get an error when populating the column:

This operation conflicts with another pending operation on this transaction.

Any idea?

Upvotes: 0

Views: 330

Answers (1)

TomTom
TomTom

Reputation: 62093

No, no way. Sorry, You requirements are not cmopatible with the way SQL Server requires DML statements to be isolated.

Upvotes: 2

Related Questions