how to get specific set of records in sql server

Say I have 50 records in my table,(unique id is auto increment from 1 to 50) how do I retrieve records 10 to 30 using a sql query

Answers


select *
from yourTable
where yourIdColumn between 10 and 30

Replace yourTable with your table's name, and yourIdColumn with the name of your unique id field.


SELECT columnlist
FROM yourTable
WHERE IDColumn BETWEEN 10 AND 30

Need Your Help

Datatable to dictionary<Int64,List<string>>

c# linq c#-4.0

This LINQ expression is not working:

How can I embed optional Where parameters in a Linq to EF statement?

entity-framework entity-framework-4.1

Let's say we have a description field on my form with optional check boxes. The check boxes represent which fields to search when doing the lookup. Right now I have a matrix of look ups that call t...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.