求一个sql触发器

来源:百度知道 编辑:UC知道 时间:2024/05/06 09:31:17
当回复表(tb_response)中有新数据插入时,留言表(tb_message)中的有一个字段--最后回复时间(lastAnsTime)立刻更改为 新记录中的 回复时间(ansTime) 字段中的值
在线求 追加分

create trigger
on tb_response
for insert
as
begin
set tb_message.lastAnsTime = current_date
//current_date这是在MYSQL中的系统当前时间
where 留言表.id=回复表.id//表信息不全,条件不好表达
end