# sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) ambiguous column name: name

- **ID:** `python/sqlalchemy-ambiguous-column-name`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A query joins multiple tables that have a column with the same name, and the column reference is not qualified.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Prefix column names with table names in the query** (98% success)
   ```
   session.query(User.name, Address.city).join(Address).filter(User.name == 'Alice').all()
   ```
2. **Use column_property with explicit table qualifiers** (90% success)
   ```
   from sqlalchemy import column
query = session.query(column('users.name'), column('addresses.city')).select_from(User).join(Address)
   ```

## Dead Ends

- **Adding aliases to all columns indiscriminately** — Aliases may not resolve the ambiguity if the column is used in conditions. (60% fail)
- **Using * in SELECT** — The wildcard still produces ambiguous column references in the result set. (75% fail)
