Explain the syntax

First_Value(expression [IGNORE NULLS]) Over( [ Partition_By_clause] order by clause [rows_range_clause])

 Posted by Rajnilari2015 on 10/24/2015 | Category: Sql Server Interview questions | Views: 1137 | Points: 40

Expression => A table column or built-in function but not analytical functions.

Rows_range_clause => It helps to further limit the effect of analytical function.

If the first value in the set is null, then the function returns null until we specify IGNORE NULLS.

However, if we specify IGNORE NULLS,then First_Value function returns the first non-nullable value else it returns all null values.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response