gpt4 book ai didi

sql - 一个命令的交易

转载 作者:行者123 更新时间:2023-11-29 11:48:20 26 4
gpt4 key购买 nike

如果在COMMIT之前,在一个事务中只发出一个命令,是否相当于完全省略事务? (特别是在 Postgres 中)

最佳答案

是的,我引用他们的文档:

PostgreSQL actually treats every SQL statement as being executed within a transaction. If you do not issue a BEGIN command, then each individual statement has an implicit BEGIN and (if successful) COMMIT wrapped around it. A group of statements surrounded by BEGIN and COMMIT is sometimes called a transaction block.

在这里找到: http://www.postgresql.org/docs/8.3/static/tutorial-transactions.html

关于sql - 一个命令的交易,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17507570/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com