create table #PostIds ( Id int ) insert into #PostIds se...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

create table #PostIds
(
 Id int
)

insert into #PostIds
select top 500000
p.Id
from Posts p
where p.PostTypeId = 1

select top 1
Id as [Post Link]
from #PostIds
order by Id desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results