title: Can we set two foreign key of one primary key in one table in MySql?
body: <p>We have two tables:</p>
  <p><strong>Student table:</strong>  T= Teacher, S= student</p>
  <pre><code>--------------------------
  |  id | name      | Role |
  --------------------------
  |  1  | Mr.Sharma | T    |
  |  2  | Ms.madhu  | T    |
  |  3  |  John     | S    |
  |  4  |  Smith    | S    |
  --------------------------
  </code></pre>
  <p><strong>Assignment table :</strong></p>
  <pre><code>--------------------------
  |  id | stud_id| tech_id |
  --------------------------
  |  1  |    3   |   1     |
  |  2  |    4   |   2     |
  |  3  |    5   |   1     |
  |  4  |    6   |   2     |
  --------------------------
  </code></pre>
  <p><strong>Expectated result:</strong></p>
  <pre><code>------------------------------
  |  id | stud_name| tech_name |
  ------------------------------
  |  1  |  John    | Mr.Sharma |
  |  2  |  Smith   | Ms.madhu  |
  ------------------------------
  </code></pre>
  <p>How can we get result like this using single query?<br />
  If any better solution for this please suggest.</p>