问题描述
表1
RegNO名称PaidAmount级别部分
A100 AAAA 750 I A
A200 BBBB 750 I B
A300 CCCC 750 I A
A400 DDDD 750 I A
表2
RegNO名称金额类别
A100 AAAA 1500 I A
A200 BBBB 1500 I B
A300 CCCC 1800 I A
A400 DDDD 1500 I A
我想要DatagridView赞这个
RegNO名称PaidAmount金额班级部分
A100 AAAA 750 1500 I A
A200 BBBB 750 1500 I B
A300 CCCC 750 1800 I A
A400 DDDD 750 1500我A
请帮助我...解决这个问题..
Table1
RegNO Name PaidAmount Class Section
A100AAAA750 IA
A200BBBB750 IB
A300CCCC750 IA
A400DDDD750 IA
Table2
RegNO Name Amount Class Section
A100AAAA1500 IA
A200BBBB1500 IB
A300CCCC1800 IA
A400DDDD1500 IA
I want DatagridView Like This
RegNO Name PaidAmount AmountClass Section
A100AAAA750 1500 IA
A200BBBB750 1500 IB
A300CCCC750 1800 IA
A400DDDD750 1500 IA
Please Help Me.. for this problem..
推荐答案
SELECT
t1.col1, t1.col2, t2.col3
FROM
table1 t1
INNER JOIN
table2 t2
ON t1.RegNO = t2.RegNO
结果集将具有可直接设置为网格源的组合数据。
Result set would have combined data that can directly be set as source for grid.
这篇关于2表显示在1个DataGridView中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!