I am trying to run this insert into select statement:
insert into xyz (select t1.column1, t1.column2 from table1 t1, table2 t2
where t1.column1 = t2.column1)
But get the error: "The number of values assigned is not the same as the number of specified or implied columns or variables"
I want to set all other columns to null (e.g. t1.column3 through t1.column50).
Is there a way to do this without having to explicitly list all the columns out in the select statement?
insert into xyz (select t1.column1, t1.column2, null as column3, null as column4, null as
column5... from table1 t1, table2 t2
where t1.column1 = t2.column1)