UPDATE no SQLite com Python

This commit is contained in:
Luiz Otávio
2023-04-02 09:25:46 -03:00
parent cc0af34766
commit d0034ee19d

View File

@@ -71,6 +71,13 @@ if __name__ == '__main__':
)
connection.commit()
cursor.execute(
f'UPDATE {TABLE_NAME} '
'SET name="QUALQUER", weight=67.89 '
'WHERE id = 2'
)
connection.commit()
cursor.execute(
f'SELECT * FROM {TABLE_NAME}'
)