我应该在SQL Server中使用事务进行单个Select,Insert,Update,Delete语句吗?

时间:2021-09-15 23:40:08

Should i use transaction for single Select, Insert, Update, Delete statements in SQL Server?

我应该在SQL Server中使用事务进行单个Select,Insert,Update,Delete语句吗?

1 个解决方案

#1


Could be useful in case you need to avoid phantoms, dirty reads or other issues like those. It could also depends on the framework you're using to perform such operations, but in a very simple scenario (one single workflow) transactions are not needed

如果您需要避免幻像,脏读或其他问题,可能会有用。它还可能取决于您用于执行此类操作的框架,但在非常简单的情况下(单个工作流)不需要事务处理

#1


Could be useful in case you need to avoid phantoms, dirty reads or other issues like those. It could also depends on the framework you're using to perform such operations, but in a very simple scenario (one single workflow) transactions are not needed

如果您需要避免幻像,脏读或其他问题,可能会有用。它还可能取决于您用于执行此类操作的框架,但在非常简单的情况下(单个工作流)不需要事务处理