Link to home
Start Free TrialLog in
Avatar of prk_usa
prk_usa

asked on

how to copy from one column to another column

Hi All,
I have a table called "m_table", it has
below columns:
s.no  submitdate   name  ---> all are varchar2 types
now I want to add a column " upddate" as Date  type
data in "submitdate" column is in 04/15/1999 ( mm/dd/yyyy format)
and I want to copy the data from "submitdate"  to  "upddate"

can you guys help me out with this.
SOLUTION
Avatar of Devinder Singh Virdi
Devinder Singh Virdi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
agree with virdi except the to_date.
See the modified version below.

Alter table m_table add ( upddate date);
update m_table set upddate= submitdate;
ASKER CERTIFIED SOLUTION
Avatar of Naveen Kumar
Naveen Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of prk_usa
prk_usa

ASKER

Thanks to evrybody , for your quick and effective replies.

virdi_ds and nav_kum_v, thanks for your explanations.