$python3 dt.py $cat dt.py # importing required library import mysql.connector # connecting to the database dataBase = mysql.connector.connect( host = “localhost”, user = “jeff”, passwd = “sixer”, database = “learning” ) # preparing a cursor object cursorObject = dataBase.cursor() # creating table studentRecord = “””CREATE TABLE STUDENT ( NAME VARCHAR(20) NOT NULL, BRANCH VARCHAR(50), ROLL …
Continue reading “Create table on a database using python and MySQL”