How to pass default values in the Insert Select construction in SQL?
I have a table:
create table1 (field1 int, field2 int, field3 int default 1337)
create table2 (field1 int, field2 int)
I want to insert table2
into table1
with a construction similar to this:
insert into table1 select field1, field2, DEFAULT from table2
Is it possible to use something instead of DEFAULT
in my example to get the task done? How are previously selected tables usually inserted with default values?