1
How do SQL auto_increment to increment the number from 2 to 2 (2, 4, 6...) in an identifier field?
create table cliente (
idcliente int not null auto_increment,
nome varchar(40) not null,
cpf char(11) unique not null,
nascimento date not null,
sexo enum('F','M') not null,
email varchar(40) unique not null,
nacionalidade varchar(10) default 'Brasil',
primary key (idcliente)
) default charset = utf8;
https://stackoverflow.com/questions/1686327/change-the-step-auto-increment-fields-increment-by
– Motta
You have to edit your my.cnf and configure auto_increment_increment = 2 or on the command line configure the variable using set this way: SET @@auto_increment_increment=2; Reply given in comment because @Motta had already pointed out a post that explains the functionality.
– Rafael Salomão
@Motts, Raphael Solomon. It would be nice if one of you (or both) would post an answer so that I can vote positively :).
– Anthony Accioly