Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting data in sqlite3
#1
Do not delete the rows from the table. There are no errors.
dsh11 = dsh[0]
all_table = var.get()
cursor.execute('DELETE FROM {} WHERE ? = 1'.format(all_table), (dsh11,))
dsh 11 gets the name of the first column of each table.
Reply


Messages In This Thread
Deleting data in sqlite3 - by JJ39 - Jun-23-2019, 02:59 PM
RE: Deleting data in sqlite3 - by noisefloor - Jun-23-2019, 03:11 PM
RE: Deleting data in sqlite3 - by JJ39 - Jun-23-2019, 03:25 PM
RE: Deleting data in sqlite3 - by noisefloor - Jun-23-2019, 04:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Basic SQL query using Py: Inserting or querying sqlite3 database not returning data marlonbown 3 1,428 Nov-08-2022, 07:16 PM
Last Post: marlonbown
  Data is deleting korotkovap 1 1,731 Aug-16-2020, 06:57 AM
Last Post: buran
  Adding data to a table in SQLite3 djwilson0495 2 3,101 Aug-15-2020, 02:48 PM
Last Post: djwilson0495
  Find data using a period of time in SQLITE3 SmukasPlays 2 2,218 Jul-30-2020, 02:02 PM
Last Post: SmukasPlays
  Deleting data in SQlite3 SmukasPlays 0 1,476 Jul-25-2020, 02:07 PM
Last Post: SmukasPlays
  sqlite3 database does not save data across restarting the program SheeppOSU 1 3,491 Jul-24-2020, 05:53 AM
Last Post: SheeppOSU
  Deleting a row in SQlite3 SmukasPlays 3 2,086 Jul-23-2020, 05:30 AM
Last Post: ndc85430
  How can I add some data from file.txt to db.sqlite3 ? Mike Ru 1 3,106 Nov-19-2018, 05:35 AM
Last Post: Mike Ru

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020