# sql: 扫描第1列出错: 将driver.Value类型[]uint8("123")转换为int: 无效语法

- **ID:** `go/database-sql-rows-scan-type-error`
- **领域:** go
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

数据库驱动返回的类型无法直接转换为Scan中的目标Go类型。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.20 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Use sql.NullInt64 or specify the correct type in the SELECT query, e.g., CAST(column AS SIGNED).
   ```

## 无效尝试

- **** — May lose numeric precision or cause type mismatches in downstream code. (50% 失败率)
- **** — Clunky and error-prone; may not handle all types correctly. (60% 失败率)
