Insert into select statement using 2 tables

I have employee table for attendance and i have a test select statement to get the total hours of employee:


select  sec_to_time(SUM(unix_timestamp(timeout) - unix_timestamp(timein))) AS totalhours from employee;

and now i want to insert the sum of hours per employee in time database with the employee no.

here is my code:
[CODE
INSERT INTO time (empno,total)
SELECT EMP_NO,sec_to_time(SUM(unix_timestamp(timeout) - unix_timestamp(timein)))
FROM employee
GROUP BY EMP_NO;



no data inserted in time database. What's erong in my query?
Thank you

TIME is a reserved word – rename this table

Thank you…