【问题标题】:Auto increment a table field while updating更新时自动增加表字段
【发布时间】:2012-03-09 04:48:37
【问题描述】:

我正在更新一个表格的不止一行。 我希望其中一个表字段在更新时自动递增。 有什么帮助吗?

我正在使用 Postgresql。 提前致谢。

【问题讨论】:

    标签: postgresql auto-increment update-statement


    【解决方案1】:

    您可以设置触发器并处理 UPDATE 操作并增加您想要的任何字段。 http://www.postgresql.org/docs/9.1/static/plpgsql-trigger.html

    【讨论】:

      猜你喜欢
      • 2018-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-07
      相关资源
      最近更新 更多