| ▲ | selimthegrim 2 days ago | |
Wonder what the [check-constraints] part meant or if it's a placeholder. | ||
| ▲ | MattRogish 2 days ago | parent | next [-] | |
“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 )’ | ||
| ▲ | minkeymaniac 2 days ago | parent | prev [-] | |
[dead] | ||