# sql: Scan error on column index 0: converting NULL to string is unsupported

- **ID:** `go/sql-scan-into-nil-pointer`
- **Domain:** go
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Database returned NULL for a column scanned into a non-nullable Go type.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Use sql.NullString: var ns sql.NullString; rows.Scan(&ns); if ns.Valid { use ns.String }
   ```
2. **** (90% success)
   ```
   Use pointers: var s *string; rows.Scan(&s); if s != nil { use *s }
   ```

## Dead Ends

- **** — May cause incorrect logic; NULL vs empty differ. (70% fail)
- **** — May not be possible; data already has NULLs. (40% fail)
