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 :: postgresql powershell query 
Sql :: date less than in sql 
Sql :: Import zipped mysql dumps 
Sql :: how to move a column to different spot mysql 
Sql :: control files oracle 
Sql :: sql limit to 5 results 
Sql :: mysql generate create table script 
Sql :: declare variable in mysql 
Sql :: difference between in and between in sql 
Sql :: date format in oracle 
Sql :: having clause in sql 
Sql :: first max salary in sql 
Sql :: if sql 
Sql :: find the all the constraints in a specific table 
Sql :: postgresql find blocked query 
Sql :: oracle list chain steps 
Sql :: c# sql conennection string 
Sql :: round border button tkinter 
Sql :: order of execution in sql 
Sql :: how to login to mysql in homestead 
Sql :: mysql dependency for spring boot 
Sql :: macos oracle docker oracle11g 
Sql :: illuminate database queryexception could not find driver (sql select * from 
Sql :: java.sql.sqlexception: the url cannot be null 
Sql :: sql max count 
Sql :: postgresql show tables 
Sql :: postgres advance table id count 
Sql :: mysql preg replace 
Sql :: how to install mysql workbench in ubuntu 20.04 
Sql :: mysql shell set time_zone 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =