Answer the question
In order to leave comments, you need to log in
How to implement IF then check on write?
Good day.
There is a table dates in which there are three columns: start_date (DATE), end_date (DATE) and is_end (INTEGER). DEFAULT CURRENT_TIMESTAMP is set for the end_date column, and DEFAULT 0 for is_end.
The implementation of the following functionality is of interest: check WHEN WRITING, if more than 14 days have passed from the start date (start_date) to the end date (end_date), then 1 will be automatically written in the is_end field , if the condition is not met, then 0.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question