What Makes Accounts One-to-One
EasyDescription
A customer can have at most one wallet in accounts. Find the rules behind that: from
pg_constraint, show conname, contype and pg_get_constraintdef(oid) as definition for every
primary key, unique and foreign key constraint of accounts.
End your query with ORDER BY contype, conname.
Tables
| accounts |
|---|
| account_id (PK) |
| customer_id (FK) |
| account_no |
| balance |
| opened_at |