Is there a way in sql (im using psql) to loop through an entire table and make an insert call on each entry based on some other attribute
example:
table worker
{
-type: manager or employee
-id
}
table payment_log
{
-worker.id
-hours
-amount earned
}
-Loop through each worker in the table, based on their worker type insert into the payment log for tthe amount they earned that day
thanks
example:
table worker
{
-type: manager or employee
-id
}
table payment_log
{
-worker.id
-hours
-amount earned
}
-Loop through each worker in the table, based on their worker type insert into the payment log for tthe amount they earned that day
thanks