-2
cx_Oracle.DatabaseError:ORA-00984:列ここPythonのデータベース・エラー(列ここでは使用できません)
cur.execute(挿入...)許可されていませんが、ここで
を許可されていない列のエラーを示していますimport cx_Oracle
class Student:
def __init__(self,studentname,studentperformance):
connection = cx_Oracle.connect('saif/saif')
cur = connection.cursor()
cur.execute('create table student (studentrollno number(10),studentname varchar2(20),studenttype varchar2(20),studentperformance number(5,2),category varchar2(20),bookbank number(1))')
self.rollno = 171641000
self.studentname = studentname
self.studentperformance = studentperformance
# Line below is showing database error
cur.execute('insert into student(studentrollno,studentname,studentperformance) values(self.rollno,self.studentname,self.studentperformance)')
s = Student("saif",75)
のいくつかを見るバインド変数を使用します。 – MikaS
に質問が追加されました – saif
まだ質問はありません、ただエラーです。 –