oracle present modification data is date data type varchar2

// convert varchar2 data type to date

alter table test add datetime date; // add a date field type

comment on column test.datetime is 'Remarks'; // add notes
update test set datetime = TO_DATE (daad , 'yyyymmddhh24miss') // into the original data and the copied date
alter table test drop column daad; // Delete original field
commit;

 

// the varchar2 type data into a number

alter table test add numb number;
 update test set numb = to_number(SASA);
 alter table test drop column SASA;
 COMMIT;

 

Published 11 original articles · won praise 0 · Views 470

Guess you like

Origin blog.csdn.net/qq_40608283/article/details/103182467