Answers for "insert bulk values into table in sqlite"

SQL
2

how to bulk insert array into sql ci

$data = array(
   array(
      'title' => 'My title' ,
      'name' => 'My Name' ,
      'date' => 'My date'
   ),
   array(
      'title' => 'Another title' ,
      'name' => 'Another Name' ,
      'date' => 'Another date'
   )
);

$this->db->insert_batch('mytable', $data);
Posted by: Guest on March-11-2020
0

insert bulk values into table in sqlite

# connect to db
database = sqlite3.connect('database.db')
cursor = database.cursor()

# using INSERT INTO in bulk (where each line represents a new entry)
cursor.execute('''INSERT INTO tablename (column1,column2) VALUES
               (data1,data2),
               (data3,data4),
           	   (data5,data6),
               (data7,data8)''')

# disconnect from db :)
database.commit()
cursor.close()
Posted by: Guest on December-30-2020

Code answers related to "insert bulk values into table in sqlite"

Code answers related to "SQL"

Browse Popular Code Answers by Language