Topic:   i want to show all students recod which have courses how i get these record from joining tables.
Mar 02, 2021 11:55 1 Replies 851 Views TEJA

  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.

Prev Next
Topic Replies (1)
  1. 1
    idnkx user

    PARTH

    select *
    from
    students s
    inner join
    studentcourse sc
    on s.Id = sc.studentId
    inner join
    course c
    on sc.courseId = c.Id

Leave a Reply
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect