mysql - correlated subquery update -


I have decided in my table that now I do not want to record the start and end time, but only a start How can I update my table in time and minutes so that it includes its value in my new column based on existing data? My attempt below produces an error:

You can not specify the target table 'Lesson' for updates in the FRM section

 < Code> Update Text SET Period = (SELECT TIME_TO_SEC (TIMEDIFF (finish_time, start_time)) / 60 as a lesson L.L.I.D. = Saban.ID  
< P>

You do not have to do this because by updating a column with the values ​​of other columns in the same line, just do it:

  chapter text duration SET period = TIME_TO_SEC (TIMEDIFF (full_time, start_time)) / 60  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -