I want to insert data from one table into another. Both tables have about 100 columns.
They don’t have the same structure, but “almost”: the source table has about 20 columns fewer- some of them are NOT NULL. For those columns, I have to define a default, of course.
My first trial resulted in an error message (surprise surprise):
Column name or number of supplied values does not match table definition
But in my complex case, this message is not really helpful. Is there a way to get a more precise error message?
Suggest making your query easier to read, rather than relying on the error message from the RDBMS. One thought: