Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table casa(
- id int auto_increment primary key,
- cep varchar(30) not null,
- hidrometro varchar(30) not null,
- matCopel varchar(30) not null
- );
- create table morador(
- cpf int not null,
- nome varchar(50) not null,
- rg varchar(20) not null,
- nCasa int not null,
- primary key(cpf),
- foreign key(nCasa) references casa(id)
- );
- select * from casa inner join morador on id = nCasa;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement