I'd be more inclined to do this in the presentation layer, but what the hell...Create Table #newsheadlines( id int identity, headline varchar(100), brief varchar(300))INSERT INTO #newsheadlines (headline, brief)VALUES ('Mars Landing A Fake', 'Yep, you heard it here first')INSERT INTO #newsheadlines (headline, brief)VALUES ('Crikey, that was dumb', 'Crocodile hunter did something stupid')INSERT INTO #newsheadlines (headline, brief)VALUES ('Tara Hits New Post Record', 'Forces upgrade of post count field to bigint')INSERT INTO #newsheadlines (headline, brief)VALUES ('Larry Ellison in animal sex romp', 'High profile CEO in compromising position with sheep')That sets up a test data table, I'd be inclined to create a temp table and insert my top 10 headlines into it.Then, if you just want side by side results, i.e. :1 | 23 | 4You can do this :SELECT * FROM #newsheadlines aINNER JOIN #newsheadlines b ON a.id = b.id - 1WHERE a.id % 2 = 1
Or if you want to go down the page and up again i.e. :1 | 42 | 53 | 6You can do something like :SELECT * FROM #newsheadlines aINNER JOIN #newsheadlines b ON b.id = a.id + ((Select count(1) FROM #newsheadlines) / 2)WHERE a.id <= ((Select count(1) FROM #newsheadlines) / 2)
Damian