# sql: Scan error on column index 1: converting driver.Value type []uint8 to int64: invalid conversion

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

## Root Cause

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

## Version Compatibility

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

## Workarounds

1. **** (85% success)
   ```
   var id int64; if err := rows.Scan(&id); err != nil { /* handle type mismatch */ }; // or scan into sql.NullString and convert
   ```

## Dead Ends

- **** — Fails at runtime if the value is not a string or []byte. (80% fail)
- **** — Leads to incorrect data handling and silent bugs. (90% fail)
