4 ms·
Wonder what the [check-constraints] part meant or if it's a placeholder.
by selimthegrim 5mo ago
Wonder what the [check-constraints] part meant or if it's a placeholder.
- minkeymaniac 5mo ago[dead]
- MattRogish 5mo ago“I intentionally wrote the example code the way a beginner might. More experienced users would probably reach for solutions like: Updating and checking the balance in a single UPDATE Using [check constraints]to ensure an account balance can never be negative.” Not the author but presumably ALTER TABLE foo ‘ADD CONSTRAINT BalanceCantBeNegative CHECK( balance >= 0 )’