This is my example relation that I am working with named 'Balance Sheet' with 4 attributes.
| companyTicker | assets | liabilities | equity |
(assets != liabilities + equity)
Checkout this answer SQL Differences between stored procedure and triggers by @Bohemian. Since the check is to be performed at the time of insertion or when updating, go with triggers.