-4
Good afternoon, I made an Sql code with the following tables:
create table Bairro(
cdbairro int not null primary key,
nmbairro varchar(80) not null
)default charset = utf8;
create table Aluno(
cdaluno int not null primary key,
nmaluno varchar(80) not null,
sexo enum('M', 'F'),
cdcursocur int,
cdrua int,
numeroaluno int not null,
cdbairro int,
cdcidade int,
dtnascimentoaluno varchar(15) not null,
foreign key (cdcursocur) references CursoCur(cdcursocur),
foreign key (cdrua) references Rua(cdrua),
foreign key (cdbairro) references Bairro(cdbairro),
foreign key (cdcidade) references Cidade(cdcidade)
)default charset = utf8;
Then my teacher requested the following item:
Show all students whose sex is M and the center neighborhood.
I would like to know how I can resolve this item, as I have tried and failed.
Also put the code of your attempt so we can help.
– 8biT
Come on. You have a student, and a student. each of a sex, and a neighborhood rum you want the male student, and living in the center. what you want from these students beyond the demands ?
– Risk
Hello, Lucas. If the answer answered your question, please accept it.
– Lucas Augusto Coelho Lopes