Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle first row

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

PREVIOUS NEXT
Code Example
Sql :: mysql set last_insert_id 
Sql :: sql update where id 
Sql :: create index mysql cli 
Sql :: mysql dump specific tables 
Sql :: sequelize migration default value 
Sql :: postgres show databases 
Sql :: mysql disable query caching 
Sql :: mysql query dates between two dates 
Sql :: create mysql database on windows 
Sql :: referential integrity constraint 
Sql :: python postgresQL select table 
Sql :: how to copy data in sql 
Sql :: sql server information_schema temp tables 
Sql :: eliminate zero from integer mysql 
Sql :: mysql update from select on same table 
Sql :: in mysql workbench contnent not feching 
Sql :: drop column from local database postgres pgadmin 
Sql :: difference between primary key and unique key 
Sql :: mysql récupérer le code création de vue 
Sql :: oracle login as sysdba 
Sql :: mysql like case sensitive 
Sql :: sqlite3 import csv 
Sql :: postgre alter table foreign key 
Sql :: how to check table name in current database sql 
Sql :: how to get date in sql 
Sql :: division by zero postgres 
Sql :: how to change db owner postgres 
Sql :: sql server drop column 
Sql :: mysql vs postgresql 
Sql :: datediff in sql 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =