4
Reply

how to solve this or finding second maximum without subquery

kannan g

kannan g

May 23 2014 7:21 AM
909
create table #ime(num varchar(20),name varchar(20),sal int); 
insert into #ime values('1','kannan',10000);
 insert into #ime values('2','dinesh',2000); 
insert into #ime values('3','dinesh1',3000);

for the above table using that following query i got that column name kk was not found
select name, dense_Rank() over(order by sal)as kk from #ime where kk=2
any buddy help me to identify the second salary from that table without sub-query

Answers (4)
Next Recommended Forum