Advertisement
murfel

MySQL Test

Jan 28th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. import MySQLdb as mdb
  5. import time
  6.  
  7. start = time.time()
  8.  
  9. con = mdb.connect('localhost', 'testuser', 'test623', 'testdb');
  10.  
  11. with con:
  12.     cur = con.cursor()
  13.     cur.execute("DROP TABLE IF EXISTS Students")
  14.  
  15. stop = time.time()
  16. print stop - start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement