Inserting Data

INSERT INTO customer (
    customer_id,
    store_id,
    first_name,
    last_name,
    email,
    address_id,
    active) 
SELECT
    customer_id,
    store_id,
    first_name,
    last_name,
    email,
    address_id,
    active
FROM newCustomer


All rows from the newCustomer table will be added to the customer table.

There is no requirement that the column names match. In fact, the DBMS does not even pay attention to the column names returned by the
SELECT. Rather, the column position is used, so the first column in the SELECT (regardless of its name) will be used to populate the first specified table column, and so on.