Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT TOP (10)
- [Join1].[Id1] AS [Id],
- [Join1].[Name] AS [Name],
- [Join1].[Price] AS [Price],
- [Join1].[NewPrice] AS [NewPrice],
- [Join1].[ShortDescription] AS [ShortDescription],
- [Join1].[SKU] AS [SKU],
- [Join1].[ProductTypeID] AS [ProductTypeID],
- [Join1].[ImageID] AS [ImageID],
- [Join1].[Promotion] AS [Promotion],
- [Join1].[ParentID] AS [ParentID],
- [Join1].[Attributes] AS [Attributes],
- [Join1].[Id2] AS [Id1],
- [Join1].[Path] AS [Path]
- FROM (
- SELECT [Extent1].[Id] AS [Id1]
- , [Extent1].[Name] AS [Name]
- , [Extent1].[Price] AS [Price]
- , [Extent1].[NewPrice] AS [NewPrice]
- , [Extent1].[ShortDescription] AS [ShortDescription]
- , [Extent1].[SKU] AS [SKU]
- , [Extent1].[ProductTypeID] AS [ProductTypeID]
- , [Extent1].[ImageID] AS [ImageID]
- , [Extent1].[Promotion] AS [Promotion]
- , [Extent1].[ParentID] AS [ParentID]
- , [Extent1].[Attributes] AS [Attributes]
- , [Extent2].[Id] AS [Id2]
- , [Extent2].[Path] AS [Path]
- , row_number() OVER (ORDER BY [Extent1].[Id] ASC) AS [row_number]
- FROM [dbo].[Products] AS [Extent1]
- INNER JOIN [dbo].[Images] AS [Extent2] ON [Extent1].[ImageID] = [Extent2].[Id]
- ) AS [Join1]
- WHERE [Join1].[row_number] > 0
- ORDER BY [Join1].[Id1] ASC
- SELECT TOP (10)
- [Join1].[Id1] AS [Id],
- [Join1].[Name] AS [Name],
- [Join1].[Price] AS [Price],
- [Join1].[NewPrice] AS [NewPrice],
- [Join1].[ShortDescription] AS [ShortDescription],
- [Join1].[SKU] AS [SKU],
- [Join1].[ProductTypeID] AS [ProductTypeID],
- [Join1].[ImageID] AS [ImageID],
- [Join1].[Promotion] AS [Promotion],
- [Join1].[ParentID] AS [ParentID],
- [Join1].[Attributes] AS [Attributes],
- [Join2].[Id] AS [Id2],
- [Join2].[Path] AS [Path]
- FROM (SELECT
- [Extent1].[Id] AS [Id1],
- [Extent1].[Name] AS [Name],
- [Extent1].[Price] AS [Price],
- [Extent1].[NewPrice] AS [NewPrice],
- [Extent1].[ShortDescription] AS [ShortDescription],
- [Extent1].[SKU] AS [SKU],
- [Extent1].[ProductTypeID] AS [ProductTypeID],
- [Extent1].[ImageID] AS [ImageID],
- [Extent1].[Promotion] AS [Promotion],
- [Extent1].[ParentID] AS [ParentID],
- [Extent1].[Attributes] AS [Attributes],
- ROW_NUMBER() OVER (ORDER BY [Extent1].[Id] ASC) AS [row_number]
- FROM [dbo].[Products] AS [Extent1]) AS [Join1]
- INNER JOIN [dbo].[Images] AS [Join2] ON [Join1].[ImageID] = [Join2].[Id]
- WHERE [Join1].[row_number] > 0
- ORDER BY [Join1].[Id1] ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement