create table pessoas(
id int not null auto_increment,
nome varchar(50) not null,
nascimento date,
sexo enum('M','F'),
peso decimal(5,2),
altura decimal(2,2),
nacionalidade varchar(20) default 'Brasil',
primary key (id)
)default charset = utf8;
When I run
insert into pessoas(id,nome,nascimento,sexo,peso,altura,nacionalidade)
values
(DEFAULT,'JOAO PAULO', 2018-02-25,'M',90,1.68, DEFAULT);
is giving this result:
JOAO PAULO 0000-00-00 M 90.00 0.99 Brazil
You're showing this error:
1 31 19:37:13 insert into people (id, name, birth, sex, weight, height, nationality)
values (DEFAULT, 'JOAO PAULO', 2018-02-25, 'M', 90,1,68, DEFAULT)
1 row (s) affected, 2 warning (s):
1264 Out of range value adjusted for column 'birth' at row 1
1264 Out of range value adjusted for column 'height' at row 1 0.015 sec
Where am I going wrong?