Skip to main content
All docs
V24.2

SelectQueryFluentBuilder.Join(String, SqlJoinType, String, String, ConditionType) Method

Joins two tables. Allows you to specify the join operation type, column names by which the tables should be joined, and a relational operation that should be used to compare column values.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v24.2.dll

Declaration

public SelectQueryFluentBuilder Join(
    string tableName,
    SqlJoinType joinType,
    string parentColumnName,
    string nestedColumnName,
    ConditionType compareOperator
)

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 type of the join operation.

parentColumnName String

A parent column name.

nestedColumnName String

A nested column name.

compareOperator ConditionType

The relational operator type.

Returns

Type Description
SelectQueryFluentBuilder

A query builder that contains the join operation result.

Example

using DevExpress.DataAccess.Sql;
// ...
var query = SelectQueryFluentBuilder
    .AddTable("Categories")
    .SelectColumns("CategoryID", "CategoryName")
    .Join(tableName: "Products",
        joinType: SqlJoinType.LeftOuter,
        parentColumnName: "CategoryID",
        nestedColumnName: "CtgID",
        compareOperator: ConditionType.NotEqual)
    .SelectColumn("ProductName")
    .Build("Categories");
See Also