当前位置:网站首页>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();
边栏推荐
- Interface test API case, data and interface separation
- 消费互联网的产业链其实是很短的,它仅仅承接平台上下游的对接和撮合的角色
- How to become a senior digital IC Design Engineer (5-2) theory: ULP low power design technology (Part 1)
- How to use clipboard JS library implements copy and cut function
- JS inheritance prototype
- Regular matching starts with XXX and ends with XXX
- Add new item after the outbound delivery order of SAP mm sto document is created?
- Huawei HCIP - datacom - Core 03 jours
- esp8266使用TF卡并读写数据(基于arduino)
- 进程和线程的区别
猜你喜欢

STM32 and motor development (from stand-alone version to Networking)

其实特简单,教你轻松实现酷炫的数据可视化大屏

Nested (multi-level) childrn routes, query parameters, named routes, replace attribute, props configuration of routes, params parameters of routes

Install pyqt5 and Matplotlib module

信息安全实验四:Ip包监视程序实现

Network request process

The configuration and options of save actions are explained in detail, and you won't be confused after reading it

第一讲:寻找矩阵的极小值

JS reverse tutorial second issue - Ape anthropology first question

【frida实战】“一行”代码教你获取WeGame平台中所有的lua脚本
随机推荐
Mysql database index study notes
La différence entre viewpager 2 et viewpager et la mise en œuvre de la rotation viewpager 2
数据库多表关联查询问题
H5 web player easyplayer How does JS realize live video real-time recording?
Huawei HCIP - datacom - Core 03 jours
(3/8)枚举的不当用法 之 方法参数(二)
二叉树高频题型
如何成为一名高级数字 IC 设计工程师(1-6)Verilog 编码语法篇:经典数字 IC 设计
[4G/5G/6G专题基础-146]: 6G总体愿景与潜在关键技术白皮书解读-1-总体愿景
The use of recycling ideas
创建一个长度为6的int型数组,要求数组元素的值都在1-30之间,且是随机赋值。同时,要求元素的值各不相同。
Jemter operation
Unity shader (pass user data to shader)
Redis common commands
Information Security Experiment 1: implementation of DES encryption algorithm
golang select机制和超时问题怎么解决
Mysql database lock learning notes
超十万字_超详细SSM整合实践_手动实现权限管理
ComputeShader
Netease cloud wechat applet