# error: sql: Scan error on column index 0: unsupported Scan, storing driver.Value type int64 into type *string

- **ID:** `go/database-sql-rows-scan-type-mismatch`
- **Domain:** go
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Scanning a database column into a Go variable of incompatible type, e.g., scanning an integer into a string pointer.

## Version Compatibility

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

## Workarounds

1. **Use sql.NullString or appropriate types** (90% success)
   ```
   var name sql.NullString
if err := rows.Scan(&name); err != nil { return err }
if name.Valid { /* use name.String */ }
   ```

## Dead Ends

- **Using fmt.Sprintf to convert values manually** — Inefficient and error-prone; use proper type mapping. (60% fail)
