So I have a table called
layoffs
with 9 columns.
I want to create a table called
layoffs_copy
which has 10 columns. 9 of them have the same data as the
layoffs
table. I want to paste data from a table called
new_dates
to the 10th column of
layoffs_copy
```.
in the same order. How do I do this?
Tried so far:
INSERT INTO layoffs_copy
SELECT *
FROM layoffs
and wanted to add the last column data next but get the "SQL error or missing database (table layoffs_copy has 10 columns but 9 values were supplied" error
New contributor
Eugenia Grigorian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.