sql - What is the easy way to delete rows in table for a given specific range? -


i have table has 2 columns, 1 flag (1 or 0) other 1 insert_date (format:28/02/2017 23:15:08). in every 5 minutes, insert statement executes in table.

i need delete rows inserted before 8:00 , after 8:00 pm every day in month (insert statement executes every day of mounth in each 5 minutes).

what's easy way done it, psql, trigger?

create scheduler job last day of every month command:

delete table1 extract (hour insert_date) not between 8 , 19 , trunc(sysdate, 'month') = trunc (insert_date, 'month'); 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -