CData JDBC Driver for JSON 2019J - Online Help

JOIN クエリ

CData JDBC Driver for JSON 2019J - Build 19.0.7354

CData JDBC Driver for JSON 2019J は次の例のような標準SQL の結合をサポートします。

内部結合

内部結合は、結合条件に合う行のみを両テーブルから選択します。

SELECT 
  [people].[personal.age] AS age, 
  [people].[personal.gender] AS gender, 
  [people].[personal.name.first] AS first_name, 
  [people].[personal.name.last] AS last_name, 
  [vehicles].[model], 
FROM 
  [people], [vehicles] 
WHERE 
  [people].[_id] = [vehicles].[people_id]

左結合

左結合は、FROM テーブルのすべての行とJOIN テーブルの条件に合う行のみを選択します。

SELECT 
  [people].[personal.age] AS age, 
  [people].[personal.gender] AS gender, 
  [people].[personal.name.first] AS first_name, 
  [people].[personal.name.last] AS last_name, 
  [vehicles].[model], 
FROM 
  [people]
LEFT OUTER JOIN 
  [vehicles] 
ON
  [people].[_id] = [vehicles].[people_id]

 
 
Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 19.0.7354.0