如何将数据从一个表上传到另一表 [英] How to upload data from one table to another table

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

问题描述

如何将数据从一个表上传到具有相同结构和字段的另一个表.

我有两个相同的表.一个在本地Macine上,另一个在远程服务器上.

在按钮上单击我需要从本地删除数据并将本地计算机的数据上传到远程计算机..

它们是我的桌子上的一个身份字段.

How to upload data from one table to another table which has same stucture and field.

I have two same table. one is on local macine and another is on remote server.

On button click i need to remove data from local and upload data of local machine to remote machine ..

Their is one identity field on my table..

推荐答案

您可以通过多种方法来实现它.

第一种方法包含以下步骤
-链接远程服务器
http://msdn.microsoft.com/en-us/library/ms188279.aspx [ ^ ]
-从本地表中删除数据
-使用
从链接的服务器插入数据
You could achieve it with several ways.

The first method contains the following steps
- link a remote server
http://msdn.microsoft.com/en-us/library/ms188279.aspx[^]
- delete data from local table
- insert data from linked server with
SET IDENTITY_INSERT


http://msdn.microsoft.com/en-us/library/ms188059.aspx [ ^ ]

远程服务器链接后,为您的更新目的创建合并语句 http://msdn.microsoft.com/en -us/library/bb510625.aspx [ ^ ]

三是使用MS SQL Server复制技术
http://msdn.microsoft.com/en-us/library/ms151198.aspx [ ^ ]

第三个是有点复杂但非常强大的技术.


http://msdn.microsoft.com/en-us/library/ms188059.aspx[^]

Second after the remote server linking create merge statement for your update purposes http://msdn.microsoft.com/en-us/library/bb510625.aspx[^]

Third is to use MS SQL Server replication technology
http://msdn.microsoft.com/en-us/library/ms151198.aspx[^]

The third is a little bit complicated but very powerful technique.


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

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