I'm doing a Java project and I have a database with two tables and one with a calculated field.
The calculated field is of type "time" and was done with the
UPDATE nome_da_tabela SET Nome_do_campo = TIMEDIFF(hora2, hora1)
I have two prepared statements in Java: one to insert and another to do the calculated field, ie Update.
Now, when I'm going to insert a record, in Java, into the table that has the calculated field and does not insert into the database. Give an error saying:
"Field 'FieldName' does not have a default value"