'''Write a python program to integrate SQL with python
by importing the MYSQL module to search an employee
number in table employee and display record, if empno not found display appropriate message '''
Coding :
[Link] as mycon
con=[Link](host='localhost',user='root',password="admin",database="employee")
cur=[Link]()
ans='y'
[Link]()=='y':
eno1=int(input("ENTER EMPNO TO SEARCH:"))
query="select * from EMPLOYEE where eno={}".format(eno1)
[Link](query)
result=[Link]()
[Link]==0:
print("Sorry!empno not found")
else:
print("%10s"%"ENO","%20s"%"ENAME","%15s"%"ESCAL")
for row in result:
print("%10s"%row[0],"%20s"%row[1],"%15s"%row[2])
ans=input("SEARCH MORE(y):")
OUTPUT: