Skip to main content
All docs
V24.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.v24.2.dll

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