Hello everyone, today I am going to discuss the Row_number feature in SQL server.
what is Row_Number()?
Row_Number is used to generate the number of each row dynamically in a sequential order based on some column orders.
Row_Number() must be used with order by clause, without order by we can not use the Row_Nuber function.
Generate unique Id for each row dynamically: – In case if the table does not have a primary key or any unique identification number. you can use Row_Number to provide the unique ID for a table.
Output from the above SQL Query
You can also watch video
- Deependra is a Senior Developer with Microsoft technologies, currently working with Opteamix India business private solution. In My Free time, I write blogs and make technical youtube videos. Having the good understanding of Service-oriented architect, Designing microservices using domain driven design.