0

CROSS APPLY for function execution

The APPLY operator is similar to the JOIN operator, however it specifically allows you to use table functions with parameters to join the results.

table1

column
------
a1
a2
a3
a4
a5

Using the query below, CROSS APPLY will join the result of the function once per row based on the passed parameter.

SELECT DISTINCT a.column, b.* FROM table1 a
CROSS APPLY myFunction(a.column) b

Norbert Krupa

Technical Consultant

Leave a Reply

Your email address will not be published. Required fields are marked *