Python MySQL

MySQL Select

Selecting data

MySQL Select

To select from a table in MySQL, use the "SELECT" statement.

Select All

mycursor.execute("SELECT * FROM customers")
myresult = mycursor.fetchall()
for x in myresult:
    print(x)