【问题标题】:Error Code: 1192. Can't execute the given command because you have active locked tables or an active transaction错误代码:1192。无法执行给定的命令,因为您有活动的锁定表或活动事务
【发布时间】:2015-10-18 14:11:31
【问题描述】:

我正在尝试在 mysql 工作台上截断我的表

truncate pbx_api.confbridges;

但它说

Error Code: 1192. Can't execute the given command because you have active locked tables or an active transaction

【问题讨论】:

标签: mysql sql mysql-workbench


【解决方案1】:

我使用 SQL 查询解决了这个问题:UNLOCK TABLES;

【讨论】:

    【解决方案2】:

    这意味着该表被排他锁定并处于事务状态。在回滚或提交之前,您无法截断。

    例如要解锁表格,请参阅@Cleber Griff 的回答。

    【讨论】:

      猜你喜欢
      • 2014-08-29
      • 2014-10-10
      • 2023-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-28
      • 1970-01-01
      相关资源
      最近更新 更多