当前位置:网站首页>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();
边栏推荐
- 印象笔记终于支持默认markdown预览模式
- golang select机制和超时问题怎么解决
- What is MD5
- How to solve the problem of golang select mechanism and timeout
- **grafana安装**
- 战略合作|SubQuery 成为章鱼网络浏览器的秘密武器
- Error: selenium common. exceptions. WebDriverException: Messag‘geckodriver‘ execute
- liunx命令
- Final keyword
- Serializer & modelserializer of DRF serialization and deserialization
猜你喜欢

JMeter JDBC batch references data as input parameters (the simplest method for the whole website)
![[cloud native] Devops (I): introduction to Devops and use of code tool](/img/e0/6152b3248ce19d0dbba3ac4845eb65.png)
[cloud native] Devops (I): introduction to Devops and use of code tool

Jenkins+ant+jmeter use

Jemter operation

【云原生】DevOps(一):DevOps介绍及Code工具使用

Colorbar of using vertexehelper to customize controls (II)

Unity shader (basic concept)

华为HCIP-DATACOM-Core_03day

信息安全实验三 :PGP邮件加密软件的使用

Over 100000 words_ Ultra detailed SSM integration practice_ Manually implement permission management
随机推荐
MongoDB怎么实现创建删除数据库、创建删除表、数据增删改查
Variable parameter of variable length function
Information Security Experiment 3: the use of PGP email encryption software
Mysql:select ... for update
Over 100000 words_ Ultra detailed SSM integration practice_ Manually implement permission management
信息安全实验四:Ip包监视程序实现
What is MD5
Confitest of fixture py
How to solve the problem of golang select mechanism and timeout
Communication mode between processes
Pycharm create a new file and add author information
Colorbar of using vertexehelper to customize controls (II)
asp. How to call vb DLL function in net project
Self awakening from a 30-year-old female programmer
Netease cloud wechat applet
Jenkins automated email
Add new item after the outbound delivery order of SAP mm sto document is created?
Netease Cloud Wechat applet
数据建模中利用3σ剔除异常值进行数据清洗
Niuke - Huawei question bank (61~70)