Re: simple(?) sql question

> 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


Other related posts: