restructure table with xmltype column
I have a table with an xmltype column and a BLOB column in it. I need to restructure this table and add an additional column. There is data that we need to keep in the table.
What is the best method? Also, need to back it up beforehand. Thanks
Original table: I changed a few column names.
F_ID_PK NOT NULL NUMBER(11)
G_ID_FK NOT NULL NUMBER(11)
FAC_ID NOT NULL NUMBER(11)
SOME_ID -- Need to add this column (some_id) here NOT NULL NUMBER(11)
ID_FLAG_NY NOT NULL VARCHAR2(1)
CREATED_BY NOT NULL VARCHAR2(50)
CREATED_DATE NOT NULL DATE
TRACKING_XML SYS.XMLTYPE(XMLSchema "http:
/trackingschema" Element "TR
ACKING") STORAGE Object-rela
tional TYPE "TRACKING697_T"
alter table xxx add yyy number(11)
make it not null
Doesn't that just add the column to the last column in the table?
I need to put it in the 4th column.
why on earth do you want to do that, there is no order in tables
Well, I am under the impression. All tables should be in this order
required (not null) columns followed by nullable and then any large objects should be at the end, if possbile.
Is this not the case?
Some people believe in column order in the table make some difference. I personally never worried about the column order in the table. I didn't even find that in any of the Oracle documents so far i have read.
Try hard to get what you like OR you will be forced to like what you get.
Originally Posted by kburrows
Click Here to Expand Forum to Full Width