import pyodbc hil_sql = """ ALTER TABLE hil_ocr_result ADD ht_ocr nvarchar(max); ALTER TABLE hil_se_ocr_result ADD ht_ocr nvarchar(max); """ afc_sql = """ ALTER TABLE afc_ocr_result ADD ht_ocr nvarchar(max); ALTER TABLE afc_se_ocr_result ADD ht_ocr nvarchar(max); """ hil_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True) hil_cursor = hil_cnxn.cursor() hil_cursor.execute(hil_sql) hil_cursor.close() hil_cnxn.close() afc_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True) afc_cursor = afc_cnxn.cursor() afc_cursor.execute(afc_sql) afc_cursor.close() afc_cnxn.close()