title: The multi-part identifier could not be bound in SQL Server
body: <p>I'm new to SQL Server and I have created three tables <code>students</code>, <code>phones</code> and <code>stud_phone</code>.</p>
  
  <p>The relation between <code>student</code> and <code>phone</code> is many-many the <code>stud_phone</code> table contains the two foreign keys from <code>student</code> and <code>phone</code> tables.</p>
  
  <p>What I want to achieve is that I want to retrieve the record of student of Id1 and their respective phones which he/she has but I'm unable to do it.</p>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>multipart identifier could not be bound</p>
  </blockquote>
  
  <p>Here is my schema:</p>
  
  <p><a href="https://i.stack.imgur.com/e02RQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e02RQ.png" alt="enter image description here"></a></p>
  
  <p>Here is my query : </p>
  
  <pre><code>select * 
  from student, phone
  join stud_phone on student.stId = 1
                  and student.stId = stud_phone.stId
                  and phone.phId = stud_phone.phId
  </code></pre>