rows, err := db.Query("SELECT * FROM csv") if err != nil { return err } defer rows.Close() columns, err := rows.Columns() if err != nil { return err } for rows.Next() { var f1, f2, f3 string err := rows.Scan(&f1, &f2, &f3) if err != nil { return err } fmt.Printf("%s=%s, %s=%s, %s=%s\n", columns[0], f1, columns[1], f2, columns[2], f3) } return nil } ➜ csv-sql-driver git:(main) ✗ go run main.go Drivers=[]string{"csvdriver"} name=Quang, age=18, birth=1997 name=Kurotaku, age=26, birth=1998 name=Hoang, age=28, birth=1996 name=Nghia, age=35, birth=1989 Demo repo: https://github.com/minhquang4334/de mo-csvsqldriver