【发布时间】:2016-01-27 11:37:20
【问题描述】:
我做了两张表,一张是exp_detail,第二张是exp_head。
exp_detail 表包含 exp_id、Amount_paid、sr_no 和 exp_Description 列
exp_head 表包含 exp_id 和 exp_Name column
现在我正在使用此查询从 exp_detail 表中检索数据。这将正确显示。这个查询是
select sr_no, e_date, e_paid, e_des
from exp_detail
where e_date = #" + this.dp_expDetail.Value.Date +
"# order by exp_detail.sr_no"
但问题是我在上面给定的查询中使用exp_head 表中的主键和外键检索exp_Name。怎么可能?
【问题讨论】:
-
您能否添加您的 C# 代码以及每个表中的一些示例数据来帮助演示您的问题?您的 SQL 实际上看起来像本机 Access SQL。如果你使用的是 C#/OLE,你可以使用更多的原生 SQL(包括参数)来完成这项工作
标签: c# asp.net database ms-access