Re: simple(?) sql question

  • From: malcolm arnold <malcolmarnold@xxxxxxxxx>
  • To: vlajos@xxxxxxxxxxxxxx
  • Date: Thu, 5 Jan 2006 10:31:00 +0000

> 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.)


Other related posts: