1
I’m setting up a database for a video store to learn SQL. My goal is to have a return date of the film. For this, I created the table with a column named "return" to store when the movie will return to the video store, using the following format:
create table acao
(
act_id int not null,
nome varchar(30) not null,
genero varchar(15) not null,
diretor varchar(30) not null,
classificacao char(2) not null,
disponibilidade char(1) not null,
retorno date
);
To fill in, I used the following command:
insert into acao (act_id, nome, diretor, classificacao, disponibilidade, retorno)
values (4, "The Mask of Zorro", "Martin Campbell", 12, "A", 23/05/2016)
When selecting to see if it worked, the date is returned as 0000-00-00. I understand that the format is YYYY-MM-DD, but I would like to know why it does not take the values I filled in.
Already tried to change 23/05/2016 to "2016-05-23" ?
– Eduardo H. M. Garcia
Thank you very much!
– Mateus Binatti