|  | 
| 
Как отличить в триггере 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=32031091&tid=1993331]: | 0ms | 
| get settings: | 9ms | 
| get forum list: | 14ms | 
| check forum access: | 4ms | 
| check topic access: | 4ms | 
| track hit: | 36ms | 
| get topic data: | 10ms | 
| get forum data: | 3ms | 
| get page messages: | 38ms | 
| get tp. blocked users: | 2ms | 
| others: | 13ms | 
| total: | 133ms | 

| 0 / 0 | 
