sql and python code example
Example 1: execut sql python
# connect database and create cursor here
import sqlite3
conn = sqlite3.connect('File.Name')
cur = conn.cursor()
# statement to be executed
cur.execute("""SELECT COL_NAME FROM TABLE_NAME LIMIT 5;""").fetchall()
Example 2: python sql
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>python -m pip install
mysql-connector-python