当前位置:网站首页>PostgreSQL创建触发器的时候报错,
PostgreSQL创建触发器的时候报错,
2022-07-07 07:01:00 【CSDN问答】
CREATE FUNCTION jins_xfupdate_func() RETURNS TRIGGER AS
$$
DECLARE
BEGIN
IF NEW.js_成绩01>=60 AND OLD. js_成绩01<60 THEN
UPDATE "jins_学生01" set js_已修学分总数01= js_已修学分总数01+(SELECT js_学分01 FROM "jins_课程01" WHERE js_课程编号01=NEW.js_课程编号01)
WHERE "jins_学生01".js_学号01=NEW. js_学号01;
RETURN NEW;
ELSE RETURN NULL;
END IF;
END
$$LANGUAGE PLPGSQL;
CREATE TRIGGER jins_TG学分统计 trigger
AFTER UPDATE ON jins_学习01"
FOR EACH ROW
EXECUTE PROCEDURE jins_xfupdate_func();
边栏推荐
- Serializer & modelserializer of DRF serialization and deserialization
- ComputeShader
- Dynamics 365online applicationuser creation method change
- 十二、排序
- 第一讲:鸡蛋的硬度
- JWT certification used in DRF
- flex弹性布局
- In fact, it's very simple. It teaches you to easily realize the cool data visualization big screen
- NETCORE 3.1 solves cross domain problems
- 答案在哪里?action config/Interceptor/class/servlet
猜你喜欢
随机推荐
ViewPager2和VIewPager的区别以及ViewPager2实现轮播图
4、 Fundamentals of machine learning
VSCode+mingw64
Niuke - Huawei question bank (61~70)
Serializer & modelserializer of DRF serialization and deserialization
Error: selenium common. exceptions. WebDriverException: Messag‘geckodriver‘ execute
Install pyqt5 and Matplotlib module
Vs2013 generate solutions super slow solutions
ComputeShader
IIS faked death this morning, various troubleshooting, has been solved
JS inheritance prototype
Information Security Experiment 2: using x-scanner scanning tool
MySql数据库-索引-学习笔记
MySQL common statements
四、机器学习基础
Jenkins task grouping
信息安全实验四:Ip包监视程序实现
[cloud native] Devops (I): introduction to Devops and use of code tool
asp. How to call vb DLL function in net project
NATAPP内网穿透