SelectQueryFluentBuilder.Join(String, SqlJoinType, String) Method
In This Article
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
NuGet Package: DevExpress.DataAccess
#Declaration
public SelectQueryFluentBuilder Join(
string tableName,
SqlJoinType joinType,
string keyColumnName
)
#Parameters
Name | Type | Description |
---|---|---|
table |
String | The name of the table with which the current table of the query builder should be joined. |
join |
Sql |
The join operation type. |
key |
String | The name of a column that is used to join the tables. |
#Returns
Type | Description |
---|---|
Select |
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