Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    1

    Unanswered: Oracle SQL Equivalent of SS "TOP" Command

    I am writing SQL scripts for an Oracle database. My background is in SQL Server (T-SQL). I am slowly learning how these two variations of SQL . Specifically, I am trying to limit the number of rows that come back from our Oracle database based on the Count.

    Question: What is the Oracle SQL equivalent of SQL-Server's T-SQL command "TOP" (SELECT TOP 50 * FROM <table>)?

    Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Use the ROWNUM pseudocolumn:
    Code:
    SELECT * FROM some_table
    WHERE rownum <= 50;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •