Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import mysql.connector
  2.  
  3. banco = mysql.connector.connect(
  4. host="localhost",
  5. user="root",
  6. passwd="StrongPass",
  7. database="eX" #call a database for conter the table
  8. )
  9.  
  10. mycursor = banco.cursor() #using cursor function to manage SQL for 'banco'
  11. mycursor.execute("CREATE TABLE students (name VARCHAR(255),age INTEGER(10))")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement