본문으로 바로가기

파이썬 pymysql fetchone()

category Coding/Python 2017. 11. 9. 01:08
반응형

# Using a while loop cursor.execute("SELECT * FROM employees") row = cursor.fetchone() while row is not None: print(row) row = cursor.fetchone() # Using the cursor as iterator cursor.execute("SELECT * FROM employees") for row in cursor: print(row)

반응형