I have 2 tables, country and division with the ff schemas:
country division
----------- ------------
countrycode divisioncode
contryname countrycode
divisionname
I want to copy data from the country table into the division table where countrycode goes into divisioncode and countrycode in division table and countryname going into divisionname
For ex, US - United States goes into the division table as US, US, United States.
Query
INSERT INTO division(divisioncode, countrycode, divisionname)
SELECT countrycode, countrycode, countryname
FROM country;
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments