|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
creating a trigger
i was wondering if anyone could tell me how to create a trigger on dates. I have a table that contains two columns. One is start date adn one is end date. Is it possible to have end date auto filled in when i enter the start date. For example when i enter a start date i would like the end date to be exactly six months from the start??
thanks |
|
#2
|
|||
|
|||
|
Code:
create trigger sb_t1 before insert on t referencing new row as n for each row set n.end_date = n.start_date + interval '6' month |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > creating a trigger |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|