当前位置:网站首页>PostgreSQL reports an error when creating a trigger,
PostgreSQL reports an error when creating a trigger,
2022-07-07 09:39:00 【CSDN Q & A】
CREATE FUNCTION jins_xfupdate_func() RETURNS TRIGGER AS
$$
DECLARE
BEGIN
IF NEW.js_ achievement 01>=60 AND OLD. js_ achievement 01<60 THEN
UPDATE "jins_ Student 01" set js_ Total credits completed 01= js_ Total credits completed 01+(SELECT js_ credits 01 FROM "jins_ Course 01" WHERE js_ Course number 01=NEW.js_ Course number 01)
WHERE "jins_ Student 01".js_ Student number 01=NEW. js_ Student number 01;
RETURN NEW;
ELSE RETURN NULL;
END IF;
END
$$LANGUAGE PLPGSQL;
CREATE TRIGGER jins_TG Credit statistics trigger
AFTER UPDATE ON jins_ Study 01"
FOR EACH ROW
EXECUTE PROCEDURE jins_xfupdate_func();
边栏推荐
- Lecture 1: stack containing min function
- Netease cloud wechat applet
- 如何使用clipboard.js库实现复制剪切功能
- 【云原生】DevOps(一):DevOps介绍及Code工具使用
- Elaborate on MySQL mvcc multi version control
- # Arthas 简单使用说明
- Mysql database lock learning notes
- Network request process
- 【BW16 应用篇】安信可BW16模组/开发板AT指令实现MQTT通讯
- Colorbar of using vertexehelper to customize controls (II)
猜你喜欢
其实特简单,教你轻松实现酷炫的数据可视化大屏
Colorbar of using vertexehelper to customize controls (II)
Difference between interface iterator and iteratable
Information Security Experiment 2: using x-scanner scanning tool
H5 web player easyplayer How does JS realize live video real-time recording?
Netease cloud wechat applet
# Arthas 简单使用说明
Dynamics 365Online ApplicationUser创建方式变更
信息安全实验二 :使用X-SCANNER扫描工具
Over 100000 words_ Ultra detailed SSM integration practice_ Manually implement permission management
随机推荐
Jenkins task grouping
Mysql database transaction learning notes
What is MD5
Kubernetes cluster capacity expansion to add node nodes
Arthas simple instructions
Unity3d interface is embedded in WPF interface (mouse and keyboard can respond normally)
JS judge whether checkbox is selected in the project
golang select机制和超时问题怎么解决
浏览器中如何让视频倍速播放
如何使用clipboard.js库实现复制剪切功能
Unittest simple project
sqlplus乱码问题,求解答
Windows starts redis service
Dynamics 365Online ApplicationUser创建方式变更
Unity uses mesh to realize real-time point cloud (I)
在EXCEL写VBA连接ORACLE并查询数据库中的内容
Unity shader (data type in cghlsl)
Error: selenium common. exceptions. WebDriverException: Messag‘geckodriver‘ execute
[bw16 application] Anxin can realize mqtt communication with bw16 module / development board at instruction
细说Mysql MVCC多版本控制