Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgresql get last 10 records

SELECT * from <table_name> order by "Date" DESC LIMIT 10;
Comment

psql get last rows

# ctid represents the physical location when you don't have an ID or a DATE
SELECT * from <table_name> ORDER BY ctid DESC LIMIT <limit>;
Comment

postgres get last value

select last_value("name") over(order by created_at desc) as name from profile
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql timestamp vs datetime 
Sql :: sqlite alter table add multiple column 
Sql :: oracle all dates between two dates 
Sql :: sql find leading space 
Sql :: mysql select or insert current datetime 
Sql :: oracle chain rules 
Sql :: sql server version check 
Sql :: how to export/import a mysql database via ssh 
Sql :: SQL Remove Primary Key Constraint - MySQL 
Sql :: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 
Sql :: postgresql escape single quote 
Sql :: SQL Modify Column in a Table -SQL Server 
Sql :: sql order by with where 
Sql :: mysql update command 
Sql :: mysql remove database 
Sql :: postegresql update to null 
Sql :: sql dcl 
Sql :: how to get max from each department in sql 
Sql :: See Foreign Key 
Sql :: square in sql 
Sql :: how to get column name in db from an sqlalchemy attribute model 
Sql :: sqlalchemy get ids 
Sql :: if else sql 
Sql :: creating sql table 
Sql :: sqlalchemy case insensitive like 
Sql :: mysql search multiple tables 
Sql :: faire la différence entre deux tables sql big query 
Sql :: mysql workbench 
Sql :: if role exists sql 
Sql :: SQL SELECT TOP Equivalent in oracal 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =