Topic: i want to show all students recod which have courses how i get these record from joining tables.
i have three tables
students table Have
Id as a primary key
Name
Enrollment
,course table have
Id as a primary key,
Title,
Code
and studentcourse table have
Id as a primary key
studentId as a foreign key,
courseId as a foreign key,
i want to show all students recod which have courses
how i get these record from joining tables.
Author: TEJA
PARTH
select *
from
students s
inner join
studentcourse sc
on s.Id = sc.studentId
inner join
course c
on sc.courseId = c.Id