来自多个sql表的gridview列 [英] gridview columns from more than one sql table
本文介绍了来自多个sql表的gridview列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i有主题表,其中包含topicTitle,periodId但我想使用其他表中的句点名称而不是periodId,我想在gridview中添加url到主题标题,怎么能我这样做?我正在使用asp.net c#
谢谢
Hi,
i have table for topics which contains topicTitle, periodId but i want to use period name from other table instead of periodId and i want to add url to topic title in the gridview, how can i do that ? i am using asp.net c#
thanks
推荐答案
使用内部加入
内部联接可发送 [ ^ ]
Use Inner Join
Inner join Examable[^]
KM Perumal建议的例子:
example from what KM Perumal suggested:
SELECT a.topicid, a.periodid, b.topicTitle, c.periodName FROM myTable a
INNER JOIN topic b ON a.topicid = b.topicid
INNER JOIN period c ON a.periodid = c.periodid;
这篇关于来自多个sql表的gridview列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文