---
title: "在数据库更新一条记录的特定字段前将表中的部分字段的原数据写入到另一张表中。"
author: "wyl232"
date: "2007-09-13T11:59:49Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2007-09-13T11:59:49Z"
id: 123521
url: "https://wyl232.iteye.com/blog/123521"
---

/\**  
*  在数据库更新一条记录的特定字段前将表中的部分字段的原数据写入到另一张表中。  
\*/  
create or replace trigger eosoperator\_pass  
  before update of PASSWORD on eosoperator   
  for each row

begin  
  insert into EOSOPERATOR\_T\_PASS (OPERATORID,USERID,PASSWORD) values(:OLD.OPERATORID,:OLD.USERID,:OLD.PASSWORD);  
end eosoperator\_pass;