I have an injection table called StudentSchool that contains :
StudentSchoolID StudentId SchoolID
1 233 22
But now I want to make the table with composite primary key like this:
StudentId SchoolID
233 22
In the first case I select using
select * from StudentSchool
where (StudentId = 233) and (SchoolID = 22)
but in the second case how to do that with it as it is a primary key
I’m not sure if I understand the question correctly.
If you want the student with StudentId 233 and SchoolId 22, then it’s the same query like for the first case.