Link to home
Create AccountLog 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
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
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
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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.