Let's say mytable has 5 columns, id being the first one.
Is it possible to do an UPDATE without hardcoding the column names?
UPDATE mytable VALUES(4, "hello", 31.12, 4141.12, "gjhg") WHERE id = 4
I haven't found it in most tutorials.
Desired use case with sqlite3:
row = (4, "hello", 31.12, 4141.12, "gjhg")
c.execute('UPDATE mytable VALUES(?) WHERE id = ?', row, row[0])
UPDATEstatement, it appears theSET column-name or column-name-listbit is mandatory.rowis built to always perfectly fit to the DB columns, I don't want to hardcode column names inUPDATE mytable SET columnname1 = ..., columnname2 = ..., ....rowcomes from aSELECT *(thus this list contains the right columns in the right order!), is modified (columns for which I know the index), and then UPDATED back in the DB.