Guest User

Untitled

a guest
May 2nd, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import psycopg2
  2.  
  3. conn = psycopg2.connect(dbname='postgres', user='postgres', password='1', host='localhost')
  4. cursor = conn.cursor()
  5.  
  6. cursor.execute(""" INSERT INTO table_name (name, make, model, year)
  7. VALUES('Alex', 'Toyota', 'Supra', '2017-10-12');
  8. """)
  9.  
  10. cursor.close()
  11. conn.close()
Add Comment
Please, Sign In to add comment