JDBC Driver for Redis

Build 22.0.8462

JOIN Queries

The CData JDBC Driver for Redis supports joins of multiple tables.

Joining Multiple Tables

You can join multiple tables just like you would in a relational database. Set SupportEnhancedSQL to True to execute these types of joins. The following examples use two tables: Restaurants and Zips.

The query below returns the Restaurant records that exist, if any, for each ZIP code:

SELECT z.city, r.name, r.borough, r.cuisine, r.zipcode
FROM Zips z
LEFT JOIN Restaurants r
ON r.zipcode = z._id

The query below returns records from both tables that match the join condition:

SELECT z.city, r.name, r.borough, r.cuisine, r.zipcode
FROM Restaurants r
INNER JOIN Zips z
ON r.zipcode = z._id

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462