delete_data.py · مثال الكتاب: title = 'Mathematics'
1import sqlite3
2connection = sqlite3.connect('fut_club.db')
3cursor = connection.cursor()
4# Delete data
5cursor.execute('''DELETE FROM players
6 WHERE name = ?''', ('Nasser',))
7print('Number of rows deleted:', connection.total_changes)
8connection.commit()
9connection.close()