Mysql 使用select insert语句更改表
我在MySQL数据库中有一个表,它从另一个表获取数据Mysql 使用select insert语句更改表,mysql,sql,database,Mysql,Sql,Database,我在MySQL数据库中有一个表,它从另一个表获取数据 create table test as select id,name,value from test2 现在,我想将来自同一test2表的另一列数据(例如country)插入到test中。 我可以更改或更新测试表吗?任何建议都会对我很有帮助。我试着这样做: alter table test add (select country from test2) 谢谢为什么不直接删除它并用新列重新创建它呢。“创建表测试作为select id、
create table test as select id,name,value from test2
现在,我想将来自同一test2表的另一列数据(例如country)插入到test中。
我可以更改或更新测试表吗?任何建议都会对我很有帮助。我试着这样做:
alter table test add (select country from test2)
谢谢为什么不直接删除它并用新列重新创建它呢。“创建表测试作为select id、name、value”、“作为来自test2的国家/地区”行吗?