Create (Crud) Using CX_ORACLE and Python

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

hi,
how insert value from text file that to oracle as date type? i have already used to_date method, but every time it says to_Date is not defined

leylasuleymanli
Автор

i could not create the table :
i used the following simple code:
---beginning of code--
import cx_Oracle
print con.version
cur=con.cursor()
statement="""CREATE TABLE gam
(
name varchar(50)
roll_number int(3)
school varchar(10)
);"""
print(statement)
cur.execute(statement)
con.commit()
cur.close()
of code--


The database is just newly installed on my laptop. And i have not done anything else on this database till now.




The output of above command is :


---beginning of output---
12.2.0.1.0
1
CREATE TABLE gam
(
name varchar(50)
roll_number int(3)
school varchar(10)
);
Traceback (most recent call last):
File test.py", line 16, in <module>
cur.execute(statement)
DatabaseError: ORA-00907: missing right parenthesis


of output---



can you please help me with this?I want to create a table named gam.

abhishekpoudel
visit shbcf.ru