假设这个视图:
SELECT
[Pr].[Id],
[Pr].[Title],
[Pr].[Category_Id] AS [CategoryId],
[Pr].[IsScanAllowed],
[Pr].[MaxLevelOfRegistration],
[Cat].[Title] AS [Category],
[Cat].[MajorCategory_Id] AS [MajorCategoryId],
[Mc].[Title] AS [MajorCategory]
[Cat].[Title]+[Pr].[Title] AS [FullProduct]
FROM [Products].[Product] AS [Pr]
INNER JOIN [Products].[Category] AS [Cat] ON [Pr].[Category_Id] = [Cat].[Id]
INNER JOIN [Products].[MajorCategory] AS [Mc] ON [Cat].[MajorCategory_Id] = [Mc].[Id];
那么有没有办法找到这个视图的每个列的基列,除了[FullProduct]
这是一个计算列,所有其他列都有一个基列。像这样的东西:BaseOf(MajorCategoryId) is [Products].[MajorCategory].[Id]
我尝试使用Microsoft.SqlServer.Management.Smo
但我找不到任何东西,有人对此有任何想法吗?