I have a large denormalized table with 108 columns. I know I can "select * from" to display all of the column values, but is there some shorthand notation for selecting all columns except for the first one?
I know I can:
select * from table;
But if I don't want col1, I have to do this:
select col2,
col3,
col4,
...
col107,
col108
from table;
Is there some way to do something like this?:
select (* minus col1) from table;
The reason I ask is that I am writing some functionality to "clone" rows in the table. I wrote an insert statement that looks like this:
insert into my_table (col2, col3, col4, ... col107, col108)
select col2, col3, col4, ... col107, col108
from my_table
where col1 = 123;
I don't insert col1 into the table because I have a trigger and sequence that will automatically populate it.
Is there some shorthand notation that I could use here to avoid having to type "col2, col3, col4, ... col107, col108"?