Re: [cx-oracle-users] alter table
Brought to you by:
atuining
From: <ama...@ub...> - 2005-06-03 07:05:56
|
Caleb Groom wrote: > Should cx-oracle be able to handle sending 'alter table' statements to > Oracle? > > I'm replacing a SQL*Plus session that is truncating table partitions and > it seems to have no effect. I'm using the same username and password as > the SQL*Plus session. No exceptions are raised, no errors. It seems to work without any problem. I tried this: >>> from cx_Oracle import * >>> cnx = connect(user,password) >>> cur = cnx.cursor() >>> cur.execute("ALTER TABLE myTable ADD newCol NUMBER") (ok) >>> cur.execute("ALTER TABLE myTable ADD newCol NUMBER") Traceback (most recent call last): File "<stdin>", line 1, in ? cx_Oracle.DatabaseError: ORA-01430: column being added already exists in table So I guess that the first ALTER TABLE did its job... If something goes wrong, you get an exception! What kind of ALTER did you try? -- Amaury Forgeot d'Arc Ubix Development www.ubitrade.com |