码迷,mamicode.com
首页 > 数据库 > 详细

Postgresql流水帐(第七天):Trigger

时间:2016-04-24 12:27:04      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:

  1. 创建一个函数
  2. 创建一个trigger, 将表和函数绑定

?

ALTER TRIGGER trigger_name ON table_name

RENAME TO new_name;

?

ALTER TRIGGER last_name_changes ON employees

RENAME TO log_last_name_changes;

?

ALTER TABLE table_name

DISABLE TRIGGER trigger_name | ALL

You specify the trigger name after the?DISABLE TRIGGER?clause to disable a particular trigger. To disable all triggers associated with a table, you use?ALL?instead of a particular trigger name.

DROP TRIGGER [IF EXISTS] trigger_name ON table_name;

Postgresql流水帐(第七天):Trigger

标签:

原文地址:http://www.cnblogs.com/songlihong/p/5426647.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!