SQLize Online / PHPize Online

A A A
Share   Donate   Blog   Popular
Copy Format Clear
create table aluno( id_aluno int not null, ra int not null unique, nome varchar (100) not null, constraint PK_id_aluno primary key(id_aluno) ); create table prova ( id_prova int not null, nota decimal(3, 1), id_aluno INT not null, constraint pk_id_prova PRIMARY KEY(id_prova), constraint fk_id_aluno FOREIGN KEY (id_aluno) REFERENCES aluno(id_aluno) ); insert into aluno values (1,1234,'Joana'); insert into prova values (1,8.7,1); insert into prova values (2,9.5,1); -- select * from aluno; -- select * from prova; select a.id_aluno, a.ra, a.nome, b.nota from aluno a inner join prova b on a.id_aluno = b.id_aluno;
Stuck with a problem? Need help? Ask professionals on our Telegram channel!
Join the channel
Your quersion is posted.
Join our Telegram channel and get answers.
Send
Copy