Separate reading from mutation
A read helps answer questions, render a view, or decide what a later step should do. Keeping that step read-only makes it easier to review and reduces the chance that an exploratory action changes production data.
Writes should express a specific business change. Include a narrow condition, bind input values safely, and consider the effect if zero rows or more rows than expected match.
Validate the intended effect
Before a destructive or bulk write, run a corresponding select with the same filters to inspect the affected records. Use a transaction or a staged process if multiple updates need to succeed as one unit.
After the write, check the returned change count and query the relevant records to confirm the desired state. A command that executes successfully may still affect no rows or produce an outcome that does not satisfy the business requirement.