import (
"sql"
"fmt"
)
db, _ := sql.Open(...)
commondSql := 'select * from table where 1 limit1'
var id
var name
var time
rows, _ := db.Query(commondSql)
rows.Next()
rows.Scan(&id, &name, &time)
fmt.Println(id, name, time)
import (
"sql"
"fmt"
)
db, _ := sql.Open(...)
commondSql := 'select * from table where 1 limit1'
var id
var name
var time
rows, _ := db.Query(commondSql)
rows.Next()
rows.Scan(&id, &name, &time)
fmt.Println(id, name, time)