title: My query doesn't work anymore when I remove a primary key
body: <p>I am creating my database  with primary key i am passing this primary key to another  table suppose, now i am deleting primary key my query is not fetching the value because i am using join to retrieve the data what is solution for that because this primary id is missing in the reference table in php mysql.</p>
  
  <p><strong>community table :</strong></p>
  
  <pre><code> c.d_id    communityname
     1          BC
     2          SC
     3          ST
  </code></pre>
  
  <p><strong>student Table</strong></p>
  
  <pre><code>  ID           Community
     1             1
     2             3
     3             1
  </code></pre>
  
  <p><strong>SQL</strong></p>
  
  <pre><code>SELECT c.communityname FROM student  s left join community c on c.d_id=s.community WHERE s.stud_rollno = '".$rollno."' GROUP BY stud_rollno
  </code></pre>