Problem Description

Wallet(user_id, balance). Two payments at same time should not allow negative balance. Write a safe transaction with check.

Input Format

SQL script

Output Format

Statements

Sample Test Case

Input:
Wallet
Output:
No negative balance

Constraints

Lock row before update

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next