Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Towards the innovative SQL ideas
Browse by Tags · View All
sql server 124
sql 123
ms sql server 118
ms sql 117
database 108
tsql 80
#SQL Server 78
t-sql 74
#sql 71
sql server general 66

Archive · View All
April 2011 14
July 2011 12
May 2011 12
August 2011 11
June 2011 10
September 2011 8
December 2011 6
November 2011 6
September 2013 5
June 2013 5

Ways to get top records from table using TOP clause in SQL Server

Apr 8 2011 12:00AM by Paresh Prajapati   

We confused sometimes during write the code logic for SQL queries when we required some of top records from tables to implement in logic. This is very basic thing for the development and here i am going to demonstrate some of the options to get top records using TOP clause  from table in various ways.

Continue Reading...

Tags: sql, sql server 2008, sql server 2005, tsql, sql server, ms sql, ms sql server, t-sql, sqllserver, top, mssql,


Paresh Prajapati
6 · 23% · 7533
3
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

5  Comments  

  • You dont need dynamic SQL

    SELECT TOP(@var) is valid syntax

    commented on Apr 9 2011 5:52AM
    Roji Thomas
    811 · 0% · 36
  • @rojipt,

    Thanks for reply. I have mentioned #1 way which you said.

    commented on Apr 9 2011 7:18AM
    Paresh Prajapati
    6 · 23% · 7533
  • Please note that SET ROWCOUNT is a deprecated feature from SQL 11 ("Denali") onwards for the INSERT/UPDATE and DELETE statements. You can still continue to use it for SELECT statements as is demonstrated in this post.

    commented on Apr 30 2011 1:39AM
    Nakul Vachhrajani
    4 · 36% · 11648
  • Does the numbering system imply the preferred method to select top records?

    commented on May 2 2011 12:53PM
    Amy
    498 · 0% · 77
  • Thanks for nice article. Btw. Your examples have no ORDER BY clause. TOP without ORDER BY is confusing, because data are unordered and results could be wrong.

    commented on Sep 21 2011 4:31AM
    Jan Novak
    453 · 0% · 88

Your Comment


Sign Up or Login to post a comment.

"Ways to get top records from table using TOP clause in SQL Server" rated 5 out of 5 by 3 readers
Ways to get top records from table using TOP clause in SQL Server , 5.0 out of 5 based on 3 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]