如何将两个数据表合并到.net中的一个数据表中
问题描述:
Hai All,
我需要合并两个datatables.First表包含2列,第二个表包含3列,我需要在一个表中组合两者,结果应该这是可能的......?
谢谢,
Aswath。
Hai All,
I need to combind two datatables.First table contains 2 columns and 2nd table contains 3 columns, i need to combind both in one table, and the result should be in 5 columns.Is it possible...?
Thanks,
Aswath.
答
是的,这是可能的。
创建第三个表有所有5列并用两个表填充数据。
yes it is possible.
Create third table have all 5 columns and populate the data with both the tables.
你需要合并两个数据库或两个表?
BTW你正在使用的数据库是什么?
you need to combine two databases or two tables ?
BTW what is the database that you are using ?
Hai
谢谢重播,
我正在使用MS SQL Server。我从数据库中获取数据,在我后面的代码中使用两个数据表进行两个存储过程。最后我需要将两个数据表合并为一个和我希望结果是pyarlally即。
datatable1 --10行x 2列
datatable2 --10行x 3列
结果表:---- 10r ows x 5列是否可能.....?
谢谢,
Aswath。
Hai
Thanks for Replay,
Im using MS SQL Server.Im getting data from Database,In code behind im using two datatables for two stored procedures.finally i need to combind two datatables to one and i want the result in pyarlally ie.
datatable1 --10 rows x 2columns
datatable2 --10 rows x 3 columns
result table:---- 10rows x 5 columns is it possible.....?
Thanks,
Aswath.