Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: simple(?) sql question

Re: simple(?) sql question

From: malcolm arnold <malcolmarnold_at_gmail.com>
Date: 2006-01-05 11:31:00
Message-id: fc3bda600601050231o6160d54dx@mail.gmail.com


> There is any way to remove column(s) from '*', if it exists after
> without hardcoding all columns names?

No, unfortunately. The '*' is nothing more than a shorthand way of selecting all columns.

> Or maybe other solution?

You could use dynamic sql. Have you done this before?

The general method would be, in pl/sql, use the user_tab_columns view to build the insert .. select you want in a varchar2. Then execute with 'execute immediate'.

(And use bind variables for the literals if this row duplication stuff is something you will do over and over.)

Malcolm

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 05 2006 - 11:31:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US