如何将表1中的数据插入表2。 [英] How to insert data from Table 1 to Table 2.
本文介绍了如何将表1中的数据插入表2。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好...
请建议我,如何将数据从table1插入table2,我没有错误,因为我的结果不正确。
我有样品结果请点击下面的图片..
http://terzasek.judlook。 com / problem.jpg [ ^ ]
谢谢 - / \-
Hello...
Please suggest me , how to insert data from table1 to table2, I don't have an error because i have the result that an incorrect.
I have the sample result please click the like bellow..
http://terzasek.judlook.com/problem.jpg[^]
Thank you -/\-
推荐答案
参考: sql_insert_into_select [ ^ ]
嗨
你只需使用下面的脚本
Hi
you just use the below script
INSERT INTO table2
(column_name1,2,3..)
SELECT column_name1,2,3..)
FROM table1;
两个表中的列tyes应该匹配。
谢谢,
-RG
Column tyes in both tables should be matched.
Thanks,
-RG
工作解决方案:
Working Solution:
INSERT INTO table1 (col1, col2, col3)
SELECT Col1, Col2, Col3 FROM table2
这篇关于如何将表1中的数据插入表2。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文