Re: query - Mailing list pgsql-sql

From Richard Huxton
Subject Re: query
Date
Msg-id 423971C6.1020706@archonet.com
Whole thread Raw
In response to Re: query  (Terry Fielder <terry@ashtonwoodshomes.com>)
List pgsql-sql
Terry Fielder wrote:
> now() returns a timestamp.
> 
> Cast it to a date and then you can subtract days. e.g.
> 
> select now()::date -1

Or CURRENT_DATE - 1

>>
>> *In oracle we write sysdate-1*
>>
>> *For example,we write a query (select * from table1 where 
>> created_date>=sysdate-1).Whats its equivalent in postgre?*

--  Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Terry Fielder
Date:
Subject: Re: query
Next
From: Kenneth Gonsalves
Date:
Subject: Re: Query performance problem