当前位置:网站首页>PowerDesigner tip 2 trigger template
PowerDesigner tip 2 trigger template
2022-06-22 09:49:00 【51CTO】
Define a trigger template , This template can be used by all tables , If you want to modify the trigger , Just modify the trigger template .
[size=x-large][color=darkred] One 、 Define trigger templates [/color][/size]
1、 Add trigger template
[img]http://dl.iteye.com/upload/attachment/0072/8841/73d67afd-dacd-3ff0-8962-38503a587b58.png[/img]
2、 List of existing trigger templates
[img]http://dl.iteye.com/upload/attachment/0072/8843/2a2de56b-50a1-303a-ac18-227b03c223de.png[/img]
3、 Create a trigger template :
[img]http://dl.iteye.com/upload/attachment/0072/8845/d1d26db1-86bb-3133-b6cc-d40b2b57e0a2.png[/img]
[img]http://dl.iteye.com/upload/attachment/0072/8847/77e1c0c8-f0e9-3e42-8f5b-449cd0a3f365.png[/img]
4、 Authoring template name :
[img]http://dl.iteye.com/upload/attachment/0072/8849/6c3bedb4-02de-3291-9aa0-d62240dc91e5.png[/img]
5、 Write trigger statement :
[img]http://dl.iteye.com/upload/attachment/0072/8851/3ed24ba1-a2ed-3abb-8e1e-72200b59c88e.png[/img]
Here's how db2、mysql Trigger statement of :
db2:
CREATE TRIGGER TRG_%TABLE%_UPDATE_TIME
before
UPDATE
ON %TABLE% REFERENCING NEW AS newrow FOR EACH ROW MODE db2sql
SET
newrow.UPDATE_TIME = CURRENT TIMESTAMP
mysql:
create trigger %TRIGGER%
before
update
on %TABLE% for each row
SET NEW.UPDATE_TIME = CURRENT_TIMESTAMP
[size=x-large][color=darkred] Two 、 User table Through the trigger template Add trigger :[/color][/size]
[img]http://dl.iteye.com/upload/attachment/0072/8853/9b32970f-2949-36ac-b27e-834b812ab8e6.png[/img]
[img]http://dl.iteye.com/upload/attachment/0072/8855/a12755d2-e98a-3921-82a5-f1947b45bde0.png[/img]
[img]http://dl.iteye.com/upload/attachment/0072/8857/592a3026-be12-3a14-ad96-798fa830bbbb.png[/img]
choice Definition, And select the template we have defined :
[img]http://dl.iteye.com/upload/attachment/0072/8859/7936712e-34b9-3844-8358-3f59789dab00.png[/img]
[img]http://dl.iteye.com/upload/attachment/0072/8861/b90b5da0-b36c-392b-af6d-b9b152ecedb9.png[/img]
边栏推荐
- Debian10 LVM逻辑卷
- 通过docker安装mysql(5.7+8.0)并配置主从复制(GTID+增强半同步)
- PAT甲级 1016 Phone Bills(时间差)
- Let you get started [uni app]
- Redis 切片集群的数据倾斜分析
- Solutions to prompt non standard import in go language
- [cmake命令笔记]find_path
- MySQL skip scan range small function to solve big problems?
- 6-7 average the surrounding elements of a two-dimensional array
- 6-35 constructing an ordered linked list
猜你喜欢
随机推荐
Tiktok practice ~ personal Center
Advanced Web Zone record of attack and defense world (I)
6-40 constructing ordered sparse polynomial chained storage
[hdu] P7079 Pty loves lines
使用pytorch mask-rcnn进行目标检测/分割训练
在ensp上做防火墙的双机热备
Solutions to prompt non standard import in go language
[structure training camp - module 3]
Zabbix5系列-使用温湿度传感器监控机房温湿度 (二十)
Summary and Prospect of AI security technology | community essay solicitation
Binary String
Up the Strip
Kali uses the command ifconfig to query the solution that the IP address is always 127.0.0.1
Win+sublime Text3 + go 1.9.2 environment setup diagram
PAT甲级 1016 Phone Bills(时间差)
[cmake命令笔记]target_compile_options
神经网络训练trick总结
Double machine hot standby of firewall on ENSP
DHCP Relay
Attack and defense world web practice area beginner level








![[popular science] to understand supervised learning, unsupervised learning and reinforcement learning](/img/24/d26c656135219a38fd64e4d370c9ee.png)
