• The referencing-variables can be: • referencing old row/ table as var • referencing new row/ table as var • old vs new variable: • Only refer to new data for insertion events. • Only refer to old data old data for the deletion events. • Refer to both old and new data for update events. • row-level vs. statement-level: • The row-level trigger refers to both row and table variable and fires the trigger once for each row. • The statement-level trigger only refers to table variable and executes only once for each statement (event). If for each clause is omitted, the trigger is statement-level. • old | new table refers to a hypothetical read-only table before | after the event. • The condition is a predicate, same as the where clause. • The action corresponds to SQL statement.用中文详细讲解以上内容及知识点
时间: 2024-04-28 07:21:05 浏览: 10
以上内容是关于数据库中触发器的相关知识点。触发器是一种特殊的存储过程,它会在特定的数据库事件发生时自动执行,常用于记录日志、限制数据的插入、更新、删除等操作。以下是一些关于触发器的详细解释:
1. 引用变量可以是:引用旧行/表作为变量,引用新行/表作为变量。
2. 旧数据 vs 新数据变量:
对于插入事件,只引用新数据。
对于删除事件,只引用旧数据。
对于更新事件,引用旧数据和新数据。
3. 行级 vs 语句级:
行级触发器指的是对于每一行都会触发一次,同时可以引用行和表变量。
语句级触发器只触发一次,并只引用表变量。如果省略了“FOR EACH”子句,则触发器为语句级触发器。
4. 旧表 | 新表指的是一个虚拟的只读表,代表事件发生前或发生后的数据。
5. 条件是一个谓词,与 where 子句相同。
6. 操作对应于 SQL 语句,可以是 insert、update、delete 等操作。
相关问题
vold : Found symlink /proc/25578/fd/7 referencing /storage/udisk2/
根据提供的引用内容,第一条引用中出现了“Failed to chmod /data/misc_ce/0: No such file or directory”这个错误信息,这个错误信息通常是由于文件或目录不存在而导致的。第二条引用中提到了软链接的效果,软链接是一种特殊的文件,它指向另一个文件或目录,类似于快捷方式。第三条引用中提到了一个符号链接,它指向了一个路径为/storage/udisk2/的目录。
综上所述,可以得出结论:在vold中发现了一个符号链接,它指向了路径为/storage/udisk2/的目录。
Line 17863: 05-22 10:05:06.928 206 214 W vold : Found symlink /proc/1883/fd/83 referencing /storage/A804-B928/dangs-factory.apk
这是一条 Android 系统日志,记录了在某个时间点发生的事件。其中,vold 是 Android 系统中的一个守护进程,主要负责管理存储设备的挂载和卸载。该日志提到了一个 symlink,即符号链接,它是指向一个文件的指针,可以简单理解为一个快捷方式。具体来说,该 symlink 指向了一个名为 "dangs-factory.apk" 的文件,该文件位于 /storage/A804-B928 目录下,而这个文件的文件描述符是 83,对应于进程号为 1883 的进程。