# sql: Scan error on column index 0: converting driver.Value type []uint8 ("abc") to a int64: invalid syntax

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

## Root Cause

The database returned a value that cannot be converted to the target Go type, such as a string to int.

## Version Compatibility

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

## Workarounds

1. **** (70% success)
   ```
   var val int64; if err := rows.Scan(&val); err != nil { return err }; // handle type mismatch
   ```
2. **** (90% success)
   ```
   Use sql.NullInt64 to handle NULL values
   ```

## Dead Ends

- **** — Data is incorrect, leading to logic errors (80% fail)
- **** — May not match the actual data type (50% fail)
