pstmt = conn.prepareStatement("insert into article "
+ "(group_id, sequence_no, posting_date, read_count, reply_count, "
+ "writer_name, password, title, content) "
+ "values (?, ?, ?, 0, 0, ?, ?, ?, ?)");
pstmt.setInt(1, article.getGroupId());
pstmt.setString(2, article.getSequenceNumber());
pstmt.setTimestamp(3, new Timestamp(article.getPostingDate()
.getTime()));
pstmt.setString(4, article.getWriterName());
pstmt.setString(5, article.getPassword());
pstmt.setString(6, article.getTitle());
pstmt.setString(7, article.getContent());
int insertedCount = pstmt.executeUpdate();
위 소스를 실행하면
Caused by: java.sql.SQLException: Field 'reply_count' doesn't have a default value
오류가 발생합니다
create table article (
article_id int not null auto_increment,
group_id int not null,
sequence_no char(16) not null,
posting_date datetime not null,
read_count int not null,
reply_count int not null,
writer_name varchar(20) not null,
password varchar(10),
title varchar(100),
content text,
primary key (article_id),
index (sequence_no)
) default character set = euckr;
이게 테이블 만드는 쿼리문이구요
도저히 왜 이런 에러 메시지가 뜨는지 이해가 안갑니다
고수님들 도와주시면 감사하겠습니다