Hi I am using sqldeveloper conected to an oracle database.
My senario is I have a customer table in my database with a date field called start_date which holds the date of the day the user signed up and a “boolean” field called is_member. Each membership only lasts one year so is_member is false if SYSDATE > start_date + 1year.
I would like to do a check to see if a user is still a member (and change is_member if not) before the user calls a select statement. Is this possible?
If not has anyone got any ideas on how else to keep the is_member field up to date? Can you do a trigger that is called once a day to see if the membership has expiered?
Thanks in advace! =]
Don’t use a table column to store dependent data, use a view:
The
is_memberview column will always contain up-to-date data.