Answers for "sql get first"

SQL
1

sql first

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;
Posted by: Guest on April-08-2021
2

sql first character

Select First two Character in selected Field with Left(string,Number of Char in int)

SELECT LEFT(FName, 2) AS FirstName FROM dbo.NameMaster
Posted by: Guest on March-02-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language