1
I have a problem in Mysql, I created the following table:
create table pessoas (
cpf int (11),
nome varchar(30) not null,
nascimento date,
endereco varchar(30) not null,
cep int(7),
bairro varchar(20),
cidade varchar(30),
uf char (2),
primary key(cpf)
)default charset = utf8;
I added a column:
alter table pessoas
add column ultima_compra date;
I tried to do the following Insert:
insert into pessoas values
('04496332780', 'João da Silva', '25-11-1969', 'Rua Antônio Numes', '88045963', 'Palmeiras','Londrina', 'PR');
And made that mistake:
ERROR 1264: 1264: Out of range value for column 'Cpf' at Row 1 SQL Statement:**
Cpf must be a varchar and not an int. Burst int capacity says error.
– rray
More in: CPF or CNPJ field type in VARCHAR or INT database?
– rray