假设我有两张桌子,Customer并且Customer_address. 从查询中填充一个数据表很简单,但是是否可以通过一个连接查询填充两个不同的数据表?
例子:
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = new OleDbCommand("SELECT a.CustomerID, b.CustomerEmail FROM Customer a INNER JOIN Customer_address b ON a.CustomerID = b.CustomerID WHERE a.CustomerID = 3", this.connection);
DataSet ds = new DataSet();
adapter.Fill(ds, "Customer");
现在我有CustomerID并且CustomerEmail在ds.Tables["Customer"].
是否可以CustomerID在不进行两个不同查询的情况下进行输入Tables["Customer"]和CustomerEmail输入?Tables["Customer_address"]