Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle select first row order by

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 :: sql blank vs null 
Sql :: how to get the date from datetime in mysql 
Sql :: oracle list datafiles 
Sql :: sqlite indexes 
Sql :: current date in postgresql minus 1 day 
Sql :: oracle list dates without weekends 
Sql :: create temporal table in sql 
Sql :: mysql date range 
Sql :: how to run mysql on terminal mac 
Sql :: unsigned int in mysql 
Sql :: SQL DEFAULT Constraint With Alter Table 
Sql :: sql select duplicates based on two columns 
Sql :: oracle tablespace tables list 
Sql :: oracle apex warning message 
Sql :: add bool column in sql 
Sql :: add a day big query 
Sql :: how to drop a unique constraint in sql 
Sql :: psql create user 
Sql :: sql date format dd-mm-yyyy 
Sql :: output table plsql 
Sql :: test the postgresql db connection 
Sql :: postgresql subtract date/hours 
Sql :: activate log mariadb 
Sql :: rename table sqlite 
Sql :: android studio SQLiteDatabase delete all data in database 
Sql :: sql server create constraint 
Sql :: mysql delete data in table 
Sql :: T-SQL - Delete Column 
Sql :: null value in column violates not-null constraint 
Sql :: combine 2 columns search query mysql 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =