Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create table as select from another one with three extra columns on first position

3255617Jun 9 2016 — edited Jun 9 2016

Hello everyone.

I am trying to create a table as the following.

CREATE TABLE new_table

            AS (SELECT  ID_FECHA_HIST AS DATE,

            ID_STATUS AS VARCHAR2(1),

            ID_FINMES AS NUMBER(1), ot.* FROM old_table ot);

But it does not seem to work. I have a cursor that containts the select ot.* from old_table ot statement and other statements like that, but in my new tables I want three extra fields that in the current table these new fields does not exists. I tried to do an alter statement later but I can not reorder the columns, and I need that the three new columns stays in the firsts positions.

Could you help me please?

Thank you.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 7 2016
Added on Jun 9 2016
5 comments
6,257 views