Question : insert into tablename select *,colname(s) from similar_tablename; when table columns diff by one or more column names

I know I can do this by listing every column name but without listing every column name, I thought there was a way to do a

INSERT INTO TABLENAME
select *,columnname from tablename_with_less_columns;

using a wildcard * and adding columns that are in the table being loaded into.  

I tried it with column_names and NULLs but nothing worked.

For the specific case I'm working on each table is identical except the table I'm trying to load data into, using this insert statement, has 2 additional columns.  If I just use an * I get an ORA-00947: not enough values error.

Answer : insert into tablename select *,colname(s) from similar_tablename; when table columns diff by one or more column names

if the columns aren't in identical order you can't do it, if they are and the extra columns are at the end, or beginning you can do it

it might look something like this...

create table taba (c1 number,c2 number,c3 number);
create table tabb(c4 number, c5 number);
insert into tabb values (1,1);
insert into tabb values (2,3);
insert into tabb values (3,4);
insert into tabb values (4,5);


insert into taba select tabb.*,null from tabb;

Random Solutions  
 
programming4us programming4us