Skip to main content
All docs
V23.2

SelectQueryFluentBuilder.Join(String, SqlJoinType, String) Method

Joins two tables. Allows you to specify the join operation type and a column name by which the tables should be joined.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v23.2.dll

NuGet Packages: DevExpress.DataAccess, DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap

Declaration

public SelectQueryFluentBuilder Join(
    string tableName,
    SqlJoinType joinType,
    string keyColumnName
)

Parameters

Name Type Description
tableName String

The name of the table with which the current table of the query builder should be joined.

joinType SqlJoinType

The join operation type.

keyColumnName String

The name of a column that is used to join the tables.

Returns

Type Description
SelectQueryFluentBuilder

A query builder object that contains the join operation result.

Example

using DevExpress.DataAccess.Sql;
// ...
var query = SelectQueryFluentBuilder
    .AddTable("Categories")
    .SelectColumns("CategoryID", "CategoryName")
    .Join(tableName: "Products",
        joinType: SqlJoinType.FullOuter,
        keyColumnName: "CategoryID")
    .SelectColumn("ProductName")
    .Build("Categories");
See Also