When copying data from one table to another. It is a simple matter of selecting the data from one table and inserting it into another table with a query such as this:
INSERT INTO dataset_XXXXX (col1, col2, col3, col4 ) SELECT col1, col2, col3, 'default' as col4 from dataset_YYYYY;
This query is copying the data from dataset_YYYYY to dataset_XXXXX. In doing so, it is getting 3 columns: col1, col2, col3 from the dataset_YYYYY, and then assigning the value 'default' to col4.
Comments
0 comments
Please sign in to leave a comment.