Guest User

Untitled

a guest
Nov 15th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. def doQuery (Conn):
  2. cur = Conn.cursor()
  3.  
  4. cur.execute ("select a, b, c, d, e, f, g from table1 group by 1,2,3,4,5,6,7 into outfile NPH_01.csv")
  5.  
  6.  
  7.  
  8. import MySQLdb
  9.  
  10. myconnection= MySQLdb.connect(host = '****', user = '****', passwd = '****', db = '****')
  11.  
  12. doQuery (myconnection)
  13.  
  14.  
  15. myconnection.close()
Add Comment
Please, Sign In to add comment