ASP.NET MSSQL Select top N values but skip M results
- by Mikey
Im working on an ASP.Net project to display information on a website from a database. I want to select the top 10 items from a news table but skip the first Item and I'm having some problem with it.
<asp:SqlDataSource ID="SqlDataSource1"
runat="server" ProviderName="System.Data.SqlClient"
ConnectionString="<%$ ConnectionStrings:ClubSiteDB %>"
SelectCommand="SELECT top 5 [id],
[itemdate],
[title],
[description],
[photo]
FROM [Announcements] order by itemdate desc">
</asp:SqlDataSource>
This is what I have so far but i can't find any info online about how to skip a record