Skip to content
Advertisement

java.sql.SQLException: Field ‘id’ doesn’t have a default value

I am trying to insert data into arrivaltimes tables but I am getting the following error:

java.sql.SQLException: Field ‘id’ doesn’t have a default value

Advertisement

Answer

You are missing AUTO INCREMENT for Primary Key in arrivaltimes table. Just need to add AUTO_INCREMENT while creating table

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement