kannan g

kannan g

  • NA
  • 5
  • 3.1k

how to solve this or finding second maximum without subquery

May 23 2014 7:21 AM
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)