Skip to content

Set CROSS/OUTER APPLY alias #595

@Droppers

Description

@Droppers

I want to assign an alias to my outer apply query as following: OUTER APPLY (...) AS myOuterApplyAlias. Is this currently possible?

I currently use the following query to create my outer apply SQL Server query:

var q = new Query()
    .Select("*")
    .From("example AS e")
    .Join(new Query()
            .Select("*")
            .From("another AS a")
            .Limit(1),
        x => x,
        "OUTER APPLY");

which results in the following SQL Server query:

SELECT * FROM [example] AS [e] 
OUTER APPLY (SELECT TOP (@p0) * FROM [another] AS [a])

the following SQL is what I want to create:

SELECT * FROM [example] AS [e] 
OUTER APPLY (SELECT TOP (@p0) * FROM [another] AS [a]) AS [myOuterApplyAlias]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions