How To: Paging Large Datasets in SQL Server
-
all in the head — Paging Large Datasets in SQL Server
One really nifty feature of SQL Server (and I wish MySQL would support this more fully) is native XML output. You can basically take any query and put FOR XML on the end, and instead of a recordset object, it returns an XML document.

