我們正在試圖讓導致從一對多的關係單列,有ATLEAST在演員表25000行和每個ATLEAST 10張圖像,MSSQL返回從一單排多個表
**Table** ActorTable
ActorId Int
ActorName nvarchar
ActorAge Int
----------------------------------------------------------------
ActorId ActorName ActorAge
----------------------------------------------------------------
1 Actor1 34
2 Actor2 40
3 Actor3 25
4 Actor4 19
5 Actor5 45
----------------------------------------------------------------
**Table** ActorImagesTable
ImgId Int
ActorId Int
ActorImage nvarchar
----------------------------------------------------------------
ImgId ActorId ActorImage
----------------------------------------------------------------
1 1 a.jpg
2 1 b.jpg
3 2 c.jpg
4 2 d.jpg
5 1 e.jpg
----------------------------------------------------------------
旺旺返回的actorId,ActorName,ActorAge,ActorImage
----------------------------------------------------------------
ActorId ActorName ActorAge ActorImage
----------------------------------------------------------------
1 Actor1 34 a.jpg,b.jpg,e.jpg
2 Actor2 40 c.jpg,d.jpg
3 Actor3 25
4 Actor4 19
5 Actor5 45
----------------------------------------------------------------
請幫
問候
您正在使用哪種版本的SQL Server? –
SQL Server 2014 – Moksha