I am running following command to fetch data of particular customer but output comes out to be null or no data found, while data is already stored in the table. Can anyone identify the problem
custid=input("Enter CustomerID:")
cur.execute("""SELECT * FROM INFYCAMPUSCONNECT.CUSTOMER WHERE CUSTOMERID= :1 """ , (custid))
1 Answer 1
The parameters need to be a tuple, so you have to put a comma in the parentheses:
cur.execute("""SELECT * FROM INFYCAMPUSCONNECT.CUSTOMER WHERE CUSTOMERID= :1 """ , (custid,))
answered Jun 13, 2018 at 19:48
Barmar
789k57 gold badges555 silver badges669 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
default
oracletag as well.