当前位置:网站首页>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();
边栏推荐
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [five nails / flying Book notice]
- Leetcode daily questions (2316. count unreachable pairs of nodes in an undirected graph)
- (3/8)枚举的不当用法 之 方法参数(二)
- 章鱼未来之星获得25万美金奖励|章鱼加速器2022夏季创业营圆满落幕
- MySql数据库-索引-学习笔记
- Unittest simple project
- Unity uses mesh to realize real-time point cloud (II)
- Data association between two interfaces of postman
- Sublime Text4 download the view in bower and set the shortcut key
- Information Security Experiment 2: using x-scanner scanning tool
猜你喜欢
随机推荐
Difference between interface iterator and iteratable
Regularly modify the system time of the computer
Install pyqt5 and Matplotlib module
esp8266使用TF卡并读写数据(基于arduino)
scrapy爬虫mysql,Django等
Jemter operation
Loxodonframework quick start
Add new item after the outbound delivery order of SAP mm sto document is created?
Jenkins automated email
Serializer & modelserializer of DRF serialization and deserialization
STM32 and motor development (from stand-alone version to Networking)
Information Security Experiment 4: implementation of IP packet monitoring program
【SVN】SVN是什么?怎么使用?
華為HCIP-DATACOM-Core_03day
4、 Fundamentals of machine learning
章鱼未来之星获得25万美金奖励|章鱼加速器2022夏季创业营圆满落幕
Difference between process and thread
[SVN] what is SVN? How do you use it?
Mysql database lock learning notes
牛客网——华为题库(61~70)





![[4G/5G/6G专题基础-146]: 6G总体愿景与潜在关键技术白皮书解读-1-总体愿景](/img/fd/5e8f74da25d9c5f7bd69dd1cfdcd61.png)



