What is wrong in the following code syntax
cur.execute('INSERT INTO %s (%s) VALUE (%s)' % (table, Column, Value))
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
The following works on my version of Python. In my opinion, there is a problem with the string. Update your
>> Table = "Kutta"
>> Column = "Says"
>> Value = "Bhow"
>> FINAL_STRING = "INSERT INTO " + Table + " (" + Column + ") VALUE (" + Value + ")"
'INSERT INTO Kutta (Says) VALUE (Bhow)'