Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: ALTER DATATYPE of Postgres table's column

mutable user:

I just started working on Postgres database and created few tables .For convenience initially, I used character varying(50) but now I want to change that to Date (dd/mm/yyyy) format.

I tried using this command


ALTER TABLE ip_role ALTER COLUMN event_dt TYPE date USING(event_dt::date);

also this-


ALTER TABLE ip_role ALTER COLUMN event_dt TYPE DATE using to_date(event_dt, 'DD/MM/YYYY');



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: ALTER DATATYPE of Postgres table's column

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×