Re: query

From: Terry Fielder <terry(at)ashtonwoodshomes(dot)com>
To: Chandan_Kumaraiah <Chandan_Kumaraiah(at)satyam(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: query
Date: 2005-03-17 11:43:29
Message-ID: 42396D61.6070002@ashtonwoodshomes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

now() returns a timestamp.

Cast it to a date and then you can subtract days. e.g.

select now()::date -1

Terry

Chandan_Kumaraiah wrote:

>
>
> *Hi,*
>
> * *
>
> *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?*
>
> * *
>
> *Chandan*
>
> * *
>

--
Terry Fielder
terry(at)greatgulfhomes(dot)com
Associate Director Software Development and Deployment
Great Gulf Homes / Ashton Woods Homes
Fax: (416) 441-9085

In response to

  • query at 2005-03-17 11:08:15 from Chandan_Kumaraiah

Responses

  • Re: query at 2005-03-17 12:02:14 from Richard Huxton

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2005-03-17 12:02:14 Re: query
Previous Message PFC 2005-03-17 11:20:16 Re: Query performance problem