mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-04 15:30:53 +08:00
Updated 多表查询 (markdown)
4
多表查询.md
4
多表查询.md
@@ -117,9 +117,7 @@ v1.8.0+ string.Join + ToList 实现将子查询的多行结果,拼接为一个
|
|||||||
```csharp
|
```csharp
|
||||||
fsql.Select<Topic>().ToList(a => new {
|
fsql.Select<Topic>().ToList(a => new {
|
||||||
id = a.Id,
|
id = a.Id,
|
||||||
concat = string.Join(",",
|
concat = string.Join(",", fsql.Select<StringJoin01>().ToList(b => b.Id))
|
||||||
fsql.Select<StringJoin01>()
|
|
||||||
.ToList(b => b.Id))
|
|
||||||
});
|
});
|
||||||
//SELECT a.`Id`, (SELECT group_concat(b.`name` separator ',')
|
//SELECT a.`Id`, (SELECT group_concat(b.`name` separator ',')
|
||||||
// FROM `StringJoin01` b)
|
// FROM `StringJoin01` b)
|
||||||
|
|||||||
Reference in New Issue
Block a user