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