Re: [cx-oracle-users] alter table
Brought to you by:
atuining
From: Caleb G. <ca...@NA...> - 2005-06-03 14:30:09
|
ama...@ub... wrote: > 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? Thanks for your example. I'm doing the same thing, except my query is: alter table mytable truncate partition Y2005_D150_S4 |