To get second last row from a table

Denny
Posted by Denny under Sql Server category on | Points: 40 | Views : 1267
select top 1* 
from EmpDetails1
where empid not in (
select top (
(select count(*) from EmpDetails1) - 2
) empid
from EmpDetails1
)

create table EmpDetails1(
empid int ,
empname varchar(50),
empimg varchar(50)
);

Comments or Responses

Login to post response