title: How to select values from two different tables in SQL
body: <p>I have two tables in my SQL Server database. The first is <code>Test1</code> and second is <code>Test2</code>. There is a column <code>RegNo</code> in both tables.</p>
  
  <p>Now I want to select the values from both the tables for a particular <code>RegNo</code>.</p>
  
  <p>This is what I'm doing</p>
  
  <pre><code>SELECT Test1.SurName, Test2.Class, Test2.Medium
  FROM Test1,Test2 JOINS
  Test2 ON Test1.RegNo = Test2.RegNo
  </code></pre>
  
  <p>But my query is giving error.</p>