Help On Postgresql

From: "Jaydip" <jaydip(at)ontrackindia(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Help On Postgresql
Date: 2001-08-23 07:50:52
Message-ID: 000801c12ba8$5924ab40$ca00a8c0@dewanji
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dear Friends

I am Jaydip Dewanji working as a Sr. Programmer for Ontrack Systems Ltd.

I have some questions regarding Postgresql which are listed below:

a) How do I retrieve the Year,Month,Day,Hr,Minute or Second value from a Date/DateTime variable.

For Example : i> In Oracle to_char(dt,'yyyy') - for extracting the year value from a date variable dt
ii> In SqlServer datepart(hh,dt) - for extracting the Hour value from a date variable dt

b) Can I create an identity column in Postgresql the value of which column will start from 1 say and keep
on incrementing by 1 OR how can I serve my purpose in any other way.

Please do let me know if any one of you have any solution.

Regards

Jaydip

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Albert Reiner 2001-08-23 12:12:32 Re: [NOVICE] protected ON DELETE CASCADE
Previous Message Murray Hobbs 2001-08-22 22:01:07 protected ON DELETE CASCADE