auto set value of a specific column after 24 hours and to delete record after one week: Oracle SQL Here is my table:
create table passwordResetLink(
link_id number(5) primary key,
link_date timestamp(0) default sysdate NOT NULL,
isExpired number(2)
email varchar2(110) UNIQUE NOT NULL,
linkUsed number(2)
);


How can I auto update isExpired column? I mean when record is inserted its value should auto set to 0 and when 24 Hours passed the 0 should be updated as 1
link_date is timestamp of inserted record. The record that has passed one week should auto be deleted from the table

Thanks
Rather than query a table, why not query a view that has your rules built in?
CREATE VIEW vwPasswordResetLink
    AS 
SELECT link_id,
       link_date, 
       CASE WHEN sysdate &gt; link_date + INTERVAL '1' DAY THEN 1
            ELSE 0 END AS isExpired,
       email,
       linkUsed
  FROM PasswordResetLink 
 WHERE link_date &gt;= sysdate - INTERVAL '7' DAY;

Then you can write a scheduled job to delete records older than 7 days to clear out expired records.
Alternatively, you could just use the above query to filter results and skip the creation of the view altogether …