当前位置:网站首页>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();
边栏推荐
- Mysql:select ... for update
- 4、 Fundamentals of machine learning
- How will fashion brands enter the meta universe?
- 【BW16 应用篇】安信可BW16模组/开发板AT指令实现MQTT通讯
- How to speed up video playback in browser
- 12、 Sort
- Upload taro pictures to Base64
- 数据建模中利用3σ剔除异常值进行数据清洗
- Netease cloud wechat applet
- The difference between viewpager2 and viewpager and the implementation of viewpager2 in the rotation chart
猜你喜欢
Netease Cloud Wechat applet
STM32 and motor development (from stand-alone version to Networking)
Lesson 1: finding the minimum of a matrix
华为HCIP-DATACOM-Core_03day
面试被问到了解哪些开发模型?看这一篇就够了
[4g/5g/6g topic foundation -147]: Interpretation of the white paper on 6G's overall vision and potential key technologies -2-6g's macro driving force for development
Jenkins modifies the system time
四、机器学习基础
In fact, it's very simple. It teaches you to easily realize the cool data visualization big screen
Unity uses mesh to realize real-time point cloud (I)
随机推荐
Install pyqt5 and Matplotlib module
Information Security Experiment 1: implementation of DES encryption algorithm
La différence entre viewpager 2 et viewpager et la mise en œuvre de la rotation viewpager 2
How will fashion brands enter the meta universe?
STM32 and motor development (from stand-alone version to Networking)
Jemter operation
Strategic cooperation subquery becomes the secret weapon of Octopus web browser
Integer or int? How to select data types for entity classes in ORM
(3/8)枚举的不当用法 之 方法参数(二)
[cloud native] Devops (I): introduction to Devops and use of code tool
(3/8) method parameters of improper use of enumeration (2)
如何成为一名高级数字 IC 设计工程师(5-3)理论篇:ULP 低功耗设计技术精讲(下)
shake数据库中怎么使用Mongo-shake实现MongoDB的双向同步啊?
Yapi test plug-in -- cross request
How to become a senior digital IC Design Engineer (1-6) Verilog coding Grammar: Classic Digital IC Design
Using JWT to realize login function
Unittest simple project
In fact, it's very simple. It teaches you to easily realize the cool data visualization big screen
網易雲微信小程序
Binary tree high frequency question type