Skip to main content
All docs
V25.1
  • SelectQueryFluentBuilder.Join(String, SqlJoinType, String, String) Method

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

    Namespace: DevExpress.DataAccess.Sql

    Assembly: DevExpress.DataAccess.v25.1.dll

    NuGet Package: DevExpress.DataAccess

    Declaration

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

    Parameters

    Name Type Description
    tableName String

    The name of the table (nested table) with which the current table (parent table) of the query builder should be joined.

    joinType SqlJoinType

    The join operation type.

    parentColumnName String

    The parent table column name.

    nestedColumnName String

    The nested table column name.

    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.RightOuter,
            parentColumnName: "CategoryID",
            nestedColumnName: "CtgID")
        .Build("Categories");
    
    See Also