i just made one change and it's working now but not as exactly i wanted. and the change is update ltime set ltime.ttime=(select addtime(ltime.ttime, timediff(rtime.ttime, '09:10')) from rtime where ltime.emp_id=rtime.emp_id and rtime.ttime>'09:10'); but when i changed the rtime.ttime values, the previous values of ltime.ttime are not added to current value. ex: rtime (emp_id ttime) as001 09:15:00 as002 09:06:00 as003 09:11:00 ltime (emp_id ttime) as001 00:06:00 as002 00:02:00 as003 00:00:00 here i want to add the ltime.ttime with timediff(rtime.ttime, '09:10'), but i got the result as ltime emp_id ttime as001 00:05:00 as002 00:00:00 as003 00:01:00