Advertisement
Guest User

Untitled

a guest
Aug 15th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #!/path/to/interpreter
  4. #!/usr/bin/env python
  5. import psycopg2
  6.  
  7. conn=psycopg2.connect(database='test',user='test',password='abc',port='8080')
  8.  
  9. cur=conn.cursor()
  10. # EMPLOYEE RECORDS
  11. cur.execute('''select IDCARD,d_Fname,d_father_name,d_address,gender from employee ''')
  12. to '/home/ubuntu/rep/employee.csv' delimiter ';' csv header;''')
  13.  
  14. print 'n'
  15. print "Successfully executed"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement