# error: sql: expected 2 arguments, got 3

- **ID:** `go/database-sql-query-arg-mismatch`
- **Domain:** go
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The number of placeholders in the SQL query does not match the number of arguments passed to Query or Exec.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.20 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Ensure the number of placeholders matches the number of arguments exactly.
   ```
2. **** (90% success)
   ```
   Use named parameters with sql.Named to avoid count mismatches.
   ```

## Dead Ends

- **** — This changes the query logic and may cause unintended results or errors. (80% fail)
- **** — The query will not execute, and subsequent operations may fail. (90% fail)
