Forum Moderators: coopster
This is a MySQL feature that you can use on integer columns. You can leave the field null when inserting rows into the table, and MySQL will automatically populate it with a unique value that is one greater than the maximum in the column already.
So if you had...
create table custmast (
custno int unsigned not null auto_increment primary key,
name char(50) not null,
address char(200) not null
);
... then for the first record you insert, thus...
insert into custmast values (null, 'Acme Corp.', 'Main Street');
... MySQL will substitute the value 1 for null. For the second insert it would be 2, and so on.
Is that what you meant?