importsqlite3# Connection created with the# database using sqlite3.connect()connection=sqlite3.connect("company.db")cursor=connection.cursor()# Create Table command executedsql=""" CREATE TABLE employee ( ID INTEGER PRIMARY KEY, fname VARCHAR(20), lname VARCHAR(30), gender CHAR(1), dob DATE);"""cursor.execute(sql)# Single Tuple insertedsql=""" INSERT INTO employee VALUES (1007, "Will", "Olsen", "M", "24-SEP-1865");"""cursor.execute(sql)# Multiple Rows insertedList=[(1008,'Rkb','Boss','M',"27-NOV-1864"),(1098,'Sak','Rose','F',"27-DEC-1864"),(1908,'Royal','Bassen',"F","17-NOV-1894")]connection.executemany("INSERT INTO employee VALUES (?, ?, ?, ?, ?)",List)print("Method-1\n")# Multiple Rows fetched from# the Databaseforrowinconnection.execute('SELECT * FROM employee ORDER BY ID'):print(row)print("\nMethod-2\n")# Method-2 to fetch multiple# rowssql=""" SELECT * FROM employee ORDER BY ID;"""cursor.execute(sql)result=cursor.fetchall()forxinresult:print(x)connection.commit()connection.close()