autoincrement

[expired user #7454]'s profile image [expired user #7454] posted 11 years ago in General Permalink
my table is not null autoincrement
in heidisql what if i do the query to
load my table.. can i right click and add a row
and edit it. i did that but it ends up ass null
if this kind of editing can be done how do i
make the new row autoincrement not null like
the rest of the table
TTSneko's profile image TTSneko posted 11 years ago Permalink
It does not end up as NULL: as soon as you have entered the data in the other fields and pressed RETURN, the "(NULL)" displayed in the ID field is automatically set to the next number.

[expired user #7454]'s profile image [expired user #7454] posted 11 years ago Permalink
I don't believe it
I forgot to press enter
but still. does editing and inserting into that way have the
same code value as the code. does it do the same thing without modifying the table properties after editing it by inserting a row and writeing into it.

TTSneko's profile image TTSneko posted 11 years ago Permalink
All table row additions done "manually" are treated the same way as with a queried INSERT as the resulting MySQL syntax is the same.

A field declared AUTO_INCREMENT and NOT_NULL therefore automatically receives the next increment and does not stay 'NULL'. Your changes (manual or not) do not influence the way your ID is defined or handled.

Please login to leave a reply, or register at first.