用C尖锐语言使用join或union [英] use of join or union in c sharp language
本文介绍了用C尖锐语言使用join或union的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用并集或联接在单个命令中访问两个不同表中的值,并在gridview中显示
How to access value from two different table in single command by using union or join and that display in gridview
推荐答案
如果您使用的是LINQ,请参见此处的示例 http://code.msdn.microsoft.com/windowsdesktop/101-LINQ-Samples-3fb9811b [ ^ ]
如果使用单个命令",则表示存储过程或SQL语句.然后,有很多资源可以解决问题.
If you are using LINQ see the examples here http://code.msdn.microsoft.com/windowsdesktop/101-LINQ-Samples-3fb9811b[^]
If by "single command" you mean a stored procedure or SQL statement. Then there are numerous resources that cover it.
如果表结构相似,请使用UNION
^ ]查询本身,仅使用一个命令.
如果表具有公共密钥,请使用JOIN
子句 [
If the table structures are similar, use aUNION
clause[^] in the query itself and use just one command.
If the tables have a common key, use aJOIN
clause[^].
这篇关于用C尖锐语言使用join或union的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文