ADO.NET Provider for JSON

Build 23.0.8839

JOIN Queries

You can use the CData ADO.NET Provider for JSON to execute standard joins. The following examples use tables in the odata.org sample Northwind database.

Inner Join

This query returns the ContactName of every Customer who has an Order and the OrderDate.

SELECT Customers.ContactName, Orders.OrderDate 
FROM Customers, Orders
WHERE Customers.CustomerID=Orders.CustomerID

Left Join

The query below retrieves the ContactName of every Customer in the Customers table and the OrderDate for every Order that the Customer placed, if any.

SELECT Customers.ContactName, Orders.OrderDate 
FROM Customers
LEFT OUTER JOIN Orders
ON Customers.CustomerID=Orders.CustomerID

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839