我有3张桌子
table1 country countrytable country table2 country
UK US
Mexico Mexico
table1 和 table2 包含国家数据。geogtable
有国家栏但没有数据
3个表中country的数据类型相同
我希望countrytable
按如下所示填充表格:
国家表:
country
----------
US
UK
Mexico
我不知道如何将数据添加到countrytable
列
我的尝试是
SELECT Country FROM table1
UNION
SELECT Country FROM table2
您可以尝试使用INSERT INTO .... SELECT
让您的结果插入到countrytable
表格中。
INSERT INTO countrytable (country)
SELECT Country FROM table1
UNION
SELECT Country FROM table2
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句