I created a table in mysql db. it has a column with auto increment value. i checked inserting data through mysql console putting jst ' ' to the place of the auto increment value in the query. it worked ok.

but when i do it through my java application (using execute query command) it says..' out of range value adjusted to column' refering to that particular auto increment column.

what is the problem here?

(sql cosole gives the same error but it adds the record to the table!...saw it little late)

Edited by jrosh: n/a

7 Years
Discussion Span
Last Post by masijade

Just simply don't include that field in the insert. i.e. you have table with field1 and field2 and field1 is auto_increment and field2 is varchar. So your query is insert into table (field2) values ('a')

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.