Java - SQL Exception column doesn't have default value -
i've got prepared statement: (i not want insert data column_1)
pstmt = artclslctcon.preparestatement("insert `temp_articles` (`title`, `author`, `author_id`, `type`, `wfurl`, `intro`, `intro_image`, `main_image`) values (?, ?, ?, ?, ?, ?, ?, ?)");
with error:
java.sql.sqlexception: field 'content_1' doesn't have default value
my database looks this:
there lots of image , content columns (17 of each).
is there anyway keep default value of image_n
, content_n
columns none
?
phpmyadmin says:
the columns don't have default value , don't support null
values, impossible insert data in if don't provide value (as you're doing). define valid default value these columns or make support null
values.
Comments
Post a Comment