I am using pymssql and i have a very simple add column statement. When i run the statement i get no error. If i run the same statement that i print out, in ms sql management studio, the column gets added.
table = 'tableName'
cmd = 'ALTER TABLE ' + table + ' ADD temp FLOAT NULL'
print(cmd)
cursor.execute(cmd)
pymssql does not automatically commit every statement you run.
Connection.commit()
Commit current transaction. You must call this method to persist your data if you leave autocommit at its default value, which is False.
http://pymssql.org/en/stable/ref/pymssql.html#connection-object-methods
So the ALTER TABLE is probably getting rolled back when your program ends.