Golang MYSQL查询某个字段所有值 查询user表,name字段所有值 func main() { var data []string err := Db.Select(&data, "SELECT name FROM `user` WHERE 1") if err != nil { log.Println(":exec failed, ", err) } fmt.Println(data) }