title: How to match values of primary key and foreign key?
body: <p>I am having a problem matching the values of my primary column from a table called "Course" and foreign key in my other table called "Curriculum". My table in sql server looks like this</p>
  
  <hr>
  
  <pre><code>COURSE TABLE
  CourseID | CourseName | CourseCode
  ----------------------------------
  8        | IT         | 62345
  9        | BA         | 64738
  10       | IS         | 62341
  </code></pre>
  
  <hr>
  
  <hr>
  
  <pre><code>CURRICULUM TABLE
  CourseCode     | CurriculumID | CourseID
  ----------------------------------------
  62345          | 87           | 4
  64738          | 98           | 5
  62341          | 78           | 6
  </code></pre>
  
  <hr>
  
  <p>these values are imported in a website I made using asp.net. I uploaded the csv file there and then it will be added in the database, after that I get these values and it seems that the primary and foreign key doesn't match. I need a query that will match these both columns. Please help. I need my Curriculum table to look like this:</p>
  
  <hr>
  
  <pre><code>CURRICULUM TABLE
  CourseCode     | CurriculumID | CourseID
  ----------------------------------------
  62345              | 87           | 8
  64738              | 98           | 9
  62341              | 78           | 10
  </code></pre>
  
  <hr>