CREATE VIEW [dbo].[AB] AS SELECT A.id,(select name from B where b.id in (a.nameID)) as names from A GO
SELECT A.id, B.name as names FROM A INNER JOIN B ON A.nameID = B.id
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)