Hi; I have the following: # sql = 'alter table %s alter column %s set default "%%s";' % (store, col) # cursor.execute(sql, colValue) cursor.execute('alter table %s alter column %s set default "%s";' % (store, col, colValue)) database.commit()
Now I don't like that third line, so I tried the commented out lines, but I got an MySQLdb.OperationalError that the suggested default value could not be inserted. However, when I printed it out and tried to insert directly, no problem, and the 3rd line works fine. What gives? TIA, beno
-- http://mail.python.org/mailman/listinfo/python-list