OneCompiler

How to update 3 columns getting data from 1 column using MYSQL Update

I have table name as attTable with 6 columns
seq_no, emp_ip, attDate, TimeIN, TimeOUT, OT

How can i update each record TimeIN, TimeOUT, OT

i can view data using below code
select emp_id as 'EMPID', min(attdate) as 'TimeIN', max(attdate) as 'TimeOUT', TIMESTAMPDIFF(minute, min(attdate), max(attdate)) - 9*60 as 'OTM' from attTable group by EMPID, date_format(attdate, '%Y-%m-%d') order by seq_no;

but how can i update

1 Answer

2 years ago by

@SLDA Live can you add link to your code?

2 years ago by OneCompiler