如何在运行时显示来自多个表的特定id记录 [英] how to show a particular id records from multiple table at run time
本文介绍了如何在运行时显示来自多个表的特定id记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好先生
即时通讯使用vb.net 2005和sql server 2000,我想在运行时从多个表中获取特定ID的记录,即如果报表加载,则会出现一个对话框,询问我要创建报表时要创建哪个ID值id = 45,则显示id为45的完整记录.
hello sir
i m using vb.net 2005 and sql server 2000 , i want to fetch record of particular id from multiple table at run time i.e, if report form get load then a dialog appear and ask for which id u want to create report if i put the value id=45 then it show complete records of id no 45.
推荐答案
,因为您还没有告诉过表,如何执行查询等.您需要在正在使用的SQL中查找Joins
即
as you haven''t told anything about the tables, how your executing the query etc. you need to look up Joins in the SQL that you are using
i.e.
SELECT a.*
FROM table1 a INNER JOIN Table2 b
ON a.ID = b.ID INNER JOIN Table3 c
ON a.ID = c.ID
WHERE a.id = 1234
Sql 2000 Join fundementals[^]
这篇关于如何在运行时显示来自多个表的特定id记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文