如何将数据从一个表复制到另一表 [英] how to copy data from one table to another table

查看:102
本文介绍了如何将数据从一个表复制到另一表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将数据从一个表复制到另一张表.

我正在使用此Querry-

Hi, I want to copy data from one table to another table.

I am using this querry-

insert into sheetdocument(ActivityID) select activityID from tablesheetold where projectid = 125



它显示受影响的100行,但sheetdocument表中没有更新.


在此先感谢.
请帮助我.



its shows 100 rows affected but there is no up dation in sheetdocument table.


Thanks in Advance.
Please help me .

推荐答案

如果该语句返回它已插入100行,请检查行数.如果是100,但看不到数据,则可能是数据类型转换问题.

还要检查这是否不是在未提交的事务中完成的(在提交之前,其他任何连接都不会看到数据),或者您没有在任何地方回滚该事务.
If the statement returns that it has inserted 100 rows, check the row count. If it is 100 but you don''t see the data then you could have a data type conversion problem.

Also check that this isn''t either done in an uncommitted transaction (no other connection would see the data until it''s committed) or that you don''t rollback the transaction anywhere.


检查两个表中ActivityID的数据类型是否匹配.
Check the datatype for ActivityID in both the table, whether it matches.


这篇关于如何将数据从一个表复制到另一表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆