I'm very new to SQL, and am trying to add a record to a table. I debugged my code and have already successfully made a database with a table called "weather." However, when I try to insert a record into the table and then print the table, no data prints in Terminal. I was wondering what I am doing wrong. Thank you.
conn = psycopg2.connect(database="postgres", user='postgres',password='password', host='127.0.0.1', port= '5432' )
conn.autocommit = True
cursor = conn.cursor()
cursor.execute('''INSERT INTO WEATHER (HUMIDITY, CITY, FEELSLIKE, HIGHLOW, TEMPERATURE) VALUES ('{%s}', '{%s}', '{%s}', '{%s}', '{%s}')'''), (humidityVal, cityVal, feelslikeVal, highlowVal, tempVal)
cursor.execute('''SELECT * from WEATHER''')
result = cursor.fetchall()
print(result)
conn.close()