Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> simple(?) sql question
Hello,
I would like to copy a row in a table, and change some columns values without knowing the exact structure of the table.
Something like:
insert into test select t.*,'val1' as col1,'val2' as col5 from test t where col2='1';
But this doesnt works.
ORA-00913: too many values
The selects result give something like:
SQL> select t.*,'val1' as col1,'val2' as col5 from test t where col2='1';
col1 col2 col3 col4 col5 col1 col5
----- ----- ----- ----- ----- ---- ----
1 1 1 1 1 val1 val2
col1,col5 columns are duplicated.
There is any way to remove column(s) from '*', if it exists after without hardcoding all columns names?
Or maybe other solution?
Thanks.
-- Veres Lajos vlajos_at_ludens.elte.hu +36 20 438 5909 -- http://www.freelists.org/webpage/oracle-lReceived on Thu Jan 05 2006 - 11:11:49 CST
![]() |
![]() |