Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active April 14, 2020 05:16
Show Gist options
  • Save aniruddha27/c08ed1c0d915d002b75cddc00acc2d3b to your computer and use it in GitHub Desktop.
Save aniruddha27/c08ed1c0d915d002b75cddc00acc2d3b to your computer and use it in GitHub Desktop.
# Insert maultiple values into table at once
customers = [(1004, 2, 'John Wick', 'Male', 32, 'New York'),
(1001, 1, 'Tony Stark', 'Male', 35, 'New York'),
(1002, 3, 'Gordon Ramsey', 'Male', 38, 'London')
]
cur.executemany('Insert Into CUSTOMER Values (?,?,?,?,?,?)', customers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment