I want to insert into a table with values from another table. and I want to use the follwing statements,
Both table_a and table_b have the followig 3 fields, “name”, “age”, and the “load_day” field which is used to partition.
If using the above syntax, we will get errors saying table has just 2 fields and table_b has 3.
So one right way to insert the data is:
What if there are many fields, thus we will need to list them one by one after select which is very tedious.
Here is the solution,