日期:2014-05-18 浏览次数:20606 次
var query = from customerRow in db.CustomerTable from orderRow in db.OrderTable where customerRow.CustomerID == orderRow.CustomerID select new { customerRow.CustomerID, orderRow.OrderID };
SELECT [t0].[CustomerID], [t1].[OrderID] FROM [dbo].[tblCustomer] AS [t0], [dbo].[tblOrder] AS [t1] WHERE [t0].[CustomerID] = [t1].[CustomerID]
SELECT tblCustomer.[CustomerID], tblOrder.[OrderID] FROM tblCustomer INNER JOIN tblOrder ON tblCustomer.[CustomerID] = tblOrder.[OrderID]