.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

how to retrieve first 100 values in database in c#

Posted By: kamlesh     Posted Date: May 24, 2011    Points:5   Category :Sql Server
hi i am developing windows application so i have one query that
how to retrieve first 100 values in database then 100 then 100 then 100 suppose i have 2000 records in my table
for that i have used SQL Server2005
please help me ..

Responses
Author: Dhiraj Ranka             
Posted Date: May 25, 2011     Points: 20   

Hi,

You can query something like this

SELECT TOP 100 * FROM TableName


Hope this helps

Hope this helps.

Thanks & Regards,
Dhiraj Ranka
http://www.twitter.com/dhirajranka | http://www.dhirajranka.com
Author: Gowthammanju             
Posted Date: May 25, 2011     Points: 20   

hi,
check the following link this might help u


http://www.codeproject.com/Answers/40686/asp-table.aspx#answer1




Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Maverick             
Posted Date: May 27, 2011     Points: 20   

Hello,

Use select top 100 from <your tablename>

Hope it helps.

Thanks,
Maverick
Author: Aamrapali Tamgadge             
Posted Date: June 01, 2011     Points: 20   

Select Top 100 From Table_name

Software Programmer At OTIS ISRC
Author: shiv chandra             
Posted Date: June 04, 2011     Points: 20   

For selected fields from table.
SELECT TOP 100 ColumnName1,ColumnName2,Columnname3 FROM TableName


If you want to select all fields, you can use.
SELECT TOP 100 * FROM TableName


Thanks,
Shiva


Regards
Shiva
Author: Narayanan             
Posted Date: July 13, 2011     Points: 20   

Hi,
use Top 100 in your select statement.
Select Top 100 * from tbl_username


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend