Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 7 lines (7 sloc) 304 Bytes
import MySQLdb
relaydb = MySQLdb.connect("localhost", "pi", "250curry", "relay")
relaycursor = relaydb.cursor()
cursor.execute("DROP TABLE IF EXISTS EMPLOYEE")
sql = """CREATE TABLE RELAY ( RELAY_NAME CHAR NOT NULL, RELAY_NUMBER INT NOT NULL, STATUS INT NOT NULL )"""
cursor.execute(sql)
relaydb.close()