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 :: print all records of table in mysql 
Sql :: sql query to search for a string in all columns 
Sql :: oracle add auto_increment column to existing table 
Sql :: how to know the username of postgresql 
Sql :: how to get data between a last week in mysql 
Sql :: sql count having 
Sql :: oracle pl sql source 
Sql :: drop unique key constraint in sql server 
Sql :: postgresql alter table sequence 
Sql :: postgres change column type to uuid 
Sql :: mysql timestamp to date 
Sql :: begin transaction in sql 
Sql :: mysql show attributes of a table 
Sql :: join update query in sql 
Sql :: drop index oracle 
Sql :: postgresql cast 
Sql :: update column data type postgres 
Sql :: brew install mysql 8 
Sql :: import large .sql files into lampp 
Sql :: get all tables using like 
Sql :: SQL Server rename foreign key constraint 
Sql :: mariadb alter table add column if not exists example 
Sql :: concat column data in sql laravel 
Sql :: mysql on duplicate key update 
Sql :: describe table postgres 
Sql :: sql only five first row 
Sql :: oracle first row 
Sql :: how to insert ip address in mysql using php 
Sql :: default constraint in ms sql 
Sql :: 1) PostgreSQL DESCRIBE TABLE using psql 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =