Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import psycopg2
- conn = psycopg2.connect(dbname='postgres', user='postgres', password='1', host='localhost')
- cursor = conn.cursor()
- cursor.execute(""" INSERT INTO table_name (name, make, model, year)
- VALUES('Alex', 'Toyota', 'Supra', '2017-10-12');
- """)
- cursor.close()
- conn.close()
Add Comment
Please, Sign In to add comment