I need to update name of customer using the input provided by the user. original_name need to be updated by new_name
cur.execute('''
CREATE TABLE customer (customerId int,customerName varchar(20),telephoneNo int,
addressId varchar(20), customerType varchar(20),
discount int, memCardType varchar(20))''')
I'm trying to perform this code, but it gives an error.
original_name=input("Enter name to be modified: ")
new_name=input("Enter new name of the customer: ")
cur.execute("UPDATE customer SET customerName=new_name WHERE customerName=original_name ")
print("Customer name changes successfully.")
Error:
cur.execute("UPDATE customer SET customerName=new_name WHERE
customerName=original_name ")
cx_Oracle.DatabaseError: ORA-00904: "ORIGINAL_NAME": invalid identifier