Yes this does work in PostgreSQL (assuming the column “date” is of datatype
Why don’t you just try it?
The standard ANSI SQL format would be:
WHERE date > current_date - interval '10' day;
I prefer that format as it makes things easier to read (but it is the same as
current_date - 10).
- Save PL/pgSQL output from PostgreSQL to a CSV file
- How to reset Postgres’ primary key sequence when it falls out of sync?
- How to concatenate strings of a string field in a PostgreSQL ‘group by’ query?
- Postgres and Indexes on Foreign Keys and Primary Keys
- How to declare a variable in a PostgreSQL query
- Create unique constraint with null columns
- How to set auto increment primary key in PostgreSQL?
- PostgreSQL: Give all permissions to a user on a PostgreSQL database
- ERROR: permission denied for sequence cities_id_seq using Postgres
- How to compare dates in datetime fields in Postgresql?
- Best way to check for “empty or null value”
- PostgreSQL Crosstab Query
- IN vs ANY operator in PostgreSQL
- Postgresql query between date ranges
- postgresql: INSERT INTO … (SELECT * …)
- Possible to perform cross-database queries with PostgreSQL?
- How do I delete a fixed number of rows with sorting in PostgreSQL?
- PostgreSQL – fetch the rows which have the Max value for a column in each GROUP BY group
- How to find a table having a specific column in postgresql
- Select Row number in postgres
- SQL SELECT speed int vs varchar
- Avoid division by zero in PostgreSQL
- PostgreSQL unnest() with element number
- IN Clause with NULL or IS NULL
- Postgres: Add constraint if it doesn’t already exist
- Discard millisecond part from timestamp
- how to move tables from public to other schema in Postgres
- How to change in postgresql password of the user using SQL
- PostgreSql INSERT FROM SELECT RETURNING ID
- Export a CREATE script for a database
- How to delete duplicate rows without unique identifier
- No unique or exclusion constraint matching the ON CONFLICT
- Getting date list in a range in PostgreSQL
- Cannot drop table users because other objects depend on it
- how to execute a .sql script on heroku?
- PostgreSQL: Create an index to quickly distinguish NULL from non-NULL values
- PostgreSQL: Case insensitive string comparison
- GROUP BY and COUNT using ActiveRecord
- How to get the trigger(s) associated with a view or a table in PostgreSQL
- PostgreSQL query to rename and change column type with single query
- PostgreSQL query to count/group by day and display days with no data
- How to write SQL in a migration in Rails
- Bulk insert, update if on conflict (bulk upsert) on Postgres
- GROUP BY and COUNT in PostgreSQL
- Using window functions in an update statement
- Finding similar strings with PostgreSQL quickly
- UPDATE with WITH and CASE – PostgreSQL
- Adding an one-out-of-two not null constraint in postgresql
- Return multiple columns of the same row as JSON array of objects
- How to drop constraints in postgres?