Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle select first 10 rows

SELECT * FROM (SELECT [COLUMNS] FROM [TABLE] ORDER BY [DATE] DESC)
    WHERE ROWNUM >= 1 AND ROWNUM <=10;
-- Oracle 12c:
SELECT * FROM (SELECT [COLUMNS] FROM [TABLE] ORDER BY [DATE] DESC) 
    FETCH FIRST 10 ROWS ONLY;
Comment

Find First 10 Row in Oracle SQL

SELECT * FROM (
  SELECT DISTINCT 
  APP_ID, 
  NAME, 
  STORAGE_GB, 
  HISTORY_CREATED, 
  TO_CHAR(HISTORY_DATE, 'DD.MM.YYYY') AS HISTORY_DATE  
  FROM HISTORY WHERE 
    STORAGE_GB IS NOT NULL AND 
      APP_ID NOT IN (SELECT APP_ID FROM HISTORY WHERE TO_CHAR(HISTORY_DATE, 'DD.MM.YYYY') ='06.02.2009')
  ORDER BY STORAGE_GB DESC )
WHERE ROWNUM <= 10
Comment

PREVIOUS NEXT
Code Example
Sql :: sql server last executed query 
Sql :: how to check username in mysql command line 
Sql :: how to start mysql 
Sql :: mysql change root mysql_native_password 
Sql :: oracle search source code 
Sql :: wordpress database query change url 
Sql :: alter table delete column 
Sql :: reset identity column in sql server 
Sql :: truncate table mysql 
Sql :: mysql remove last character 
Sql :: oracle service name view 
Sql :: how to run mysql in git bash 
Sql :: update column name and datatype in sql 
Sql :: insert column with default value in sql 
Sql :: postgres select from last 3 months 
Sql :: MySQL - Enabling the Event Scheduler 
Sql :: sqlite insert row 
Sql :: second last highest id in sql 
Sql :: mysql created at yesterdau 
Sql :: How to fetch data in between startfromdate to starenddate in sql 
Sql :: get current year sql 
Sql :: how to check database size in mysql 
Sql :: sqlite foreign key 
Sql :: monthname sql 
Sql :: sql get domain from url 
Sql :: insert postgres 
Sql :: mysql show carset 
Sql :: mqtt Error: Address not available 
Sql :: sql update query 
Sql :: mysql mediumint max value 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =