Hi
Inayat,
Please use following:
CREATE TABLE Employee
(Name VARCHAR(10),
Age INT,
Salary INT)
insert into Employee
select 'Haidarali',29,29000 union all
select 'Rashidali',2,20000 union all
select 'Imdadhusen',28,50000 union all
select 'Abbas',25,58000
SELECT RANK() OVER(ORDER BY Salary DESC) AS Rank,* FROM dbo.Employee;
Please do let me know, if you have any doubt.
Please provide "
Vote":thumbsup: if this would be helpful, and make "
Accept Answer" if this would be correct answer.:rose:
Thanks,
Imdadhusen