如何使用C#将表中的一列复制到另一表中的另一列 [英] how to copy one column in a table in to another column in other table using c#

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

问题描述

我需要复制一个表中的整个整列并将其使用c#插入到另一张表中.任何人都可以帮忙吗?

i am in a need where i have to copy one entire column in a table and to insert that column in to another table using c#.can anyone please help?

推荐答案

使用

插入表1(列名),从表2中选择列名;

另外,两列的数据类型应该相同.
use

Insert into Table1 (column-name) select column-name from Table2;

Also the data-type of the two columns should me same.


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

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