sql - Incrementing a field value over time in Oracle 12c -




i new databases , dbms. have table in there multiples integer fields. number(3,0)

is there way increment (+1) each ones of fields on time pl/sql (automatic)?

for example, have field test(number(3,0)) in table , want value increment 1 every hour passes.

thanks!

it's little game, want every user 1 coin in accounts every day/hour passes

you create job it:

dbms_scheduler.create_job (     job_name        => 'give_gold',     job_type        => 'plsql_block',     job_action      => 'begin update tab_name set gold_val = gold_val+1; end;',     start_date      => systimestamp,     repeat_interval => 'freq=hourly; byminute=0',     end_date        => null,     enabled         => true,     comments        => 'this job gives +1 gold every hour'); 

of course fire stored procedure , make complex calculations. more info: dbms_scheduler





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -