FIRST VALUE function in SQL Server

Publicado el: 06 octubre 2015
en el canal de: kudvenkat
82,911
509

In this video we will discuss FIRST_VALUE function in SQL Server

FIRST_VALUE function
Introduced in SQL Server 2012
Retrieves the first value from the specified column
ORDER BY clause is required
PARTITION BY clause is optional

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
   / @aarvikitchen5572  

Syntax : FIRST_VALUE(Column_Name) OVER (ORDER BY Col1, Col2, ...)

FIRST_VALUE function example WITHOUT partitions : In the following example, FIRST_VALUE function returns the name of the lowest paid employee from the entire table.

SELECT Name, Gender, Salary,
FIRST_VALUE(Name) OVER (ORDER BY Salary) AS FirstValue
FROM Employees

FIRST_VALUE function example WITH partitions : In the following example, FIRST_VALUE function returns the name of the lowest paid employee from the respective partition.

SELECT Name, Gender, Salary,
FIRST_VALUE(Name) OVER (PARTITION BY Gender ORDER BY Salary) AS FirstValue
FROM Employees

Text version of the video
http://csharp-video-tutorials.blogspo...

Slides
http://csharp-video-tutorials.blogspo...

All SQL Server Text Articles
http://csharp-video-tutorials.blogspo...

All SQL Server Slides
http://csharp-video-tutorials.blogspo...

All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenka...

All Dot Net and SQL Server Tutorials in Arabic
   / kudvenkatarabic  


En esta página del sitio puede ver el video en línea FIRST VALUE function in SQL Server de Duración hora minuto segunda en buena calidad , que subió el usuario kudvenkat 06 octubre 2015, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 82,911 veces y le gustó 509 a los espectadores. Disfruta viendo!