title: Check constraint between two tables
body: <p>I have two tables, let's call them A and B. They have One to many relationship.</p>
  
  <p><strong>Table A</strong></p>
  
  <pre><code>Trxid int,
  TotalAmount decimal(10,2)
  </code></pre>
  
  <p><strong>Table B</strong></p>
  
  <pre><code>Trxid int,
  TblBcol Varchar,
  Amount decimal(10,2)
  </code></pre>
  
  <p>Table B contains breakup details for Table A.</p>
  
  <p><strong>My requirement :</strong> sum of <code>Amount</code> column of Table B should be equal to Table A's <code>TotalAmount</code> column for each <code>trxid</code>. </p>
  
  <p>Is there any constraint available to achieve this or is there any other way?</p>