Last active
August 14, 2024 03:58
-
-
Save arofiqimaulana/dbf2ff55c4832591a611c6ea879488ba to your computer and use it in GitHub Desktop.
Update Command SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def updateData(df): | |
| data = df.loc[:,['profesi_master','updated_at','userid']].values.tolist() | |
| sql_update =""" | |
| UPDATE tblcustomfieldsvalues | |
| SET value = %s, updated_at = %s | |
| WHERE relid = %s | |
| """ | |
| mycursor1 = connWarehouse.cursor() | |
| mycursor1.executemany(sql_update,data) | |
| connWarehouse.commit() | |
| mycursor1.close() | |
| connWarehouse.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment