Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
set nocount on
create table WHATEVER (COL int)
insert into WHATEVER (COL) values (3)
insert into WHATEVER (COL) values (5)
insert into WHATEVER (COL) values (87)
insert into WHATEVER (COL) values (255)
insert into WHATEVER (COL) values (5644)
insert into WHATEVER (COL) values (54)
insert into WHATEVER (COL) values (64)
insert into WHATEVER (COL) values (72)
insert into WHATEVER (COL) values (2)
insert into WHATEVER (COL) values (5)
declare @i int
declare @result int
set @i = 0
-- let's say you want to find the 6th highest value
select @i = @i + 1, @result = case @i when 6 then COL else @result end
from WHATEVER
order by COL desc
select @result
drop table whatever
set nocount off