Skip to content
Advertisement

How do I copy a column from one table to another table in sql

two tables region(region_id,region_name)

countries(country_id,country_name,region_id)

there are many country_id and country_name in countries table with region_id given multiple times to those countries ( region_id are only 4) I need to create a table or view where it shows region_name and number of countries with the regions.

expected output = view( region_name, no. of countries)

Advertisement

Answer

Creating View should be a better option Rather than a table for this Requirement.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement