[Solved] Composite key =[foreign key+primary key]


That design would make your Teacher table Many-to-many, which you should normalise like so:

CREATE TABLE #Student
(
    id INT -- student
)

CREATE TABLE #Teacher
(
    id INT -- teacher
)

CREATE TABLE #TeacherStudent
(
    id INT,   -- optional
    t_id INT, -- teacher
    s_id INT  -- student
)

You could create an id on the TeacherStudent table or create a composite key from the other id’s you have in that table.

solved Composite key =[foreign key+primary key]