Skip to content

The best way to effectively do exec many? #58

@thedmdim

Description

@thedmdim

Hi! Could you advice me the best way to INSERT multiple rows?

  1. I could firstly compose INSERT INTO table (col1, col2) VALUES (?, ?), (?, ?), (?, ?) ... and so many (?, ?) as I have rows to write. Then Execute
  2. Either I could do sqlitex.Execute(conn, "INSERT INTO table (col1, col2) VALUES (?, ?);", ...) in a loop, for all rows I need to persist

( I use sqlitex.Open())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions