I am trying to insert data into my SQL table via Python.
My code is:
sql = "INERT INTO TABLE VALUES" + str(tuple(row))
cursor.execute(sql)
The issue I have is that I am getting syntax errors on words such as table's due to the apostrophe.
I cannot use:
replace('\'','\'\'')
on the str because that would change the whole SQL insert.
Is it possible to insert the row data of each element inside a tuple to eliminate this issue?