From 074a2f3cdfeccc6bddf1b7b9381555148e7b39fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Sat, 1 Apr 2023 14:48:26 -0300 Subject: [PATCH] =?UTF-8?q?Inserindo=20v=C3=A1rios=20valores=20com=20execu?= =?UTF-8?q?te=20many?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aula205/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aula205/main.py b/aula205/main.py index 2a026aa..02524a0 100644 --- a/aula205/main.py +++ b/aula205/main.py @@ -36,7 +36,13 @@ sql = ( 'VALUES ' '(?, ?)' ) -cursor.execute(sql, ['Joana', 4]) +# cursor.execute(sql, ['Joana', 4]) +cursor.executemany( + sql, + ( + ('Joana', 4), ('Luiz', 5) + ) +) connection.commit() print(sql)