|
Как отличить в триггере insert это или update
|
|||
---|---|---|---|
#18+
Hi all. На добавление и редактирование записи в табличке у меня делаются практически одни и те же операции. Но что-то надо делать только на добавление, напр. ID взять из sequenca. Как отличить внутри триггера, что за операция? ... |
|||
:
Нравится:
Не нравится:
|
|||
23.05.2002, 10:33 |
|
Как отличить в триггере insert это или update
|
|||
---|---|---|---|
#18+
Сам себе отвечаю: Within the code of the trigger body, you can include the following conditions: IF INSERTING THEN . . . END IF; IF UPDATING THEN . . . END IF; The first condition evaluates to TRUE only if the statement that fired the trigger is an INSERT statement; the second condition evaluates to TRUE only if the statement that fired the trigger is an UPDATE statement. ... |
|||
:
Нравится:
Не нравится:
|
|||
23.05.2002, 10:57 |
|
|
start [/forum/topic.php?fid=52&msg=32031096&tid=1993331]: |
0ms |
get settings: |
10ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
33ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
41ms |
get tp. blocked users: |
1ms |
others: | 281ms |
total: | 403ms |
0 / 0 |