Jul 20, 2002 #1 tourtch Programmer Joined Jul 20, 2002 Messages 2 Location EG hi all i want to retriving a specific number of matches in my query not all matches select * from my-table (return five matches only) Thanks
hi all i want to retriving a specific number of matches in my query not all matches select * from my-table (return five matches only) Thanks
Jul 20, 2002 #2 tlbroadbent MIS Joined Mar 16, 2001 Messages 9,982 Location US Use TOP 5 to return 5 records. See SQL BOL for more details. Select Top 5 * From table Where <criteria> Order By <columnlist> Terry L. Broadbent - DBA Computing Links: http://tlbroadbent.home.attbi.com/prog.htm faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions. Upvote 0 Downvote
Use TOP 5 to return 5 records. See SQL BOL for more details. Select Top 5 * From table Where <criteria> Order By <columnlist> Terry L. Broadbent - DBA Computing Links: http://tlbroadbent.home.attbi.com/prog.htm faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.