Sunday, 27 August 2017

Create Dynamic Serial Number in Sql Server

Create Dynamic Serial Number in Sql Server


Table Structure

Column Name                  Column Type                  
User_EmailId                     nvarchar(50)

Table Data

User_EmailId          
kush@gmail.com    
lav@gmail.com       
rina@gmail.com      
shipra@gmail.com  
sakshi@gmail.com  
ramu@gmail.com    

select row_number()
over(order by User_EmailId asc) as 'SNo',
User_Emailid from login


SNo    User_Emailid
1        kush@gmail.com
2        lav@gmail.com
3        ramu@gmail.com
4        rina@gmail.com
5        sakshi@gmail.com
6        shipra@gmail.com

No comments:

Post a Comment

React Hooks - custom Hook

  v CustomHook Ø React allows us to create our own hook which is known as custom hook. Example – 1 localStorage Demo Step-1 Create ...