sql insert query list of dictionaries code example
Example: sql insert query list of dictionaries
cursor.executemany("""
INSERT INTO
mytable
(id, price, type)
VALUES
(%(id)s, %(price)s, %(type)s)
""", lst)
cursor.executemany("""
INSERT INTO
mytable
(id, price, type)
VALUES
(%(id)s, %(price)s, %(type)s)
""", lst)