create table teacher(
id int primary key,
name varchar(64)
);
create table student(
teacher_id int,
name varchar(64),
foreign key (teacher_id) references teacher(id)
);
insert into teacher (id, name) values (1, 'Teacher');
insert into student (teacher_id, name) values (1, 'Me');
select *
from student s
join teacher t on t.id = s.teacher_id
;