innerJoin

abstract fun innerJoin(table: KQLiteTable): JoinStatement<T>

Adds an INNER JOIN clause to the SELECT statement.

An INNER JOIN selects records that have matching values in both tables. After calling this method, you must specify the join condition using the on or using methods provided by the returned JoinStatement.

Example

// Selects employees and their corresponding department names
val cursor = Employees
.select(Employees.firstName, Departments.name)
.innerJoin(Departments)
.on(Employees.departmentId, Departments.id)
.execute()

Return

A JoinStatement to define the join condition (ON/USING).

Author

MOHAMMAD AZIM ANSARI

Parameters

table

The KQLiteTable to join with the current table.

See also


abstract fun innerJoin(selectStatement: SelectStatement<*>): JoinStatement<T>