About 2,440,000 results
Open links in new tab
  1. SQL SELECT TOP, LIMIT, FETCH FIRST ROWS ONLY, ROWNUM - W3Schools

    The SELECT TOP clause is used to specify the number of records to return. The SELECT TOP clause is useful on large tables with thousands of records. Returning a large number of records can impact performance. Select only the first 3 records of …

  2. sql - Get top 1 row of each group - Stack Overflow

    Jul 27, 2011 · First_value can be thought of as a way to accomplish Select Top 1 when using an over clause. Over allows grouping in the select list so instead of writing nested subqueries (like many of the existing answers do), this does it in a more readable fashion.

  3. TOP (Transact-SQL) - SQL Server | Microsoft Learn

    Dec 30, 2024 · You can specify the TOP clause with the WITH TIES argument only in SELECT statements, and only if you also specify the ORDER BY clause. The returned order of tying …

  4. SQL TOP, LIMIT, FETCH FIRST Clause - GeeksforGeeks

    6 days ago · We have explained all TOP, LIMIT and FETCH FIRST clause in SQL with examples, and also mentioned their supported DBMS to avoid confusion. Users should check if the clause is supported by their DBMS before using them.

  5. SQL Server SELECT TOP

    This tutorial shows you how to use the SQL Server SELECT TOP statement to limit the number of rows or percentage of rows returned by a query.

  6. SQL SELECT TOP statement overview and examples

    This article will describe the SQL SELECT TOP statement structure with practical examples.

  7. Understanding and Implementing 'SELECT TOP 1' in SQL

    Apr 17, 2024 · This tutorial explores the use of ‘SELECT TOP 1’ across different SQL database engines, namely Microsoft SQL Server, MySQL, and PostgreSQL. We’ll look at the syntax, practical examples, and the underlying mechanics that make this feature important for efficient database querying.

  8. SQL TOPSQL Tutorial

    For example, if you want to retrieve the first 10 rows, you would use SELECT TOP 10. column1, column2, …: These are the columns you want to retrieve from the table. You can specify one or more columns separated by commas. table_name: This is the name of the table from which you want to retrieve data.

  9. Sql SELECT TOP 1 - Stack Overflow

    If you are ordering only by TICKETSASSIGNED and they all have equal values, there is no reason any specific record should be returned as the top one. If you want to get the top one using USERID as the next field to order by, then yes, you should …

  10. SELECT TOP 1 - SQL Server Planet

    May 23, 2010 · Essentially, the select top 1 method is used to find the min or max record for a particular column’s value. There is some debate as to whether this is the ‘correct’ method of querying, however it should be known that this method does not break any guidelines and is supported by all standards of SQL.