Changing dateType of a column
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Changing dateType of a column

  1. #1
    Join Date
    Jun 2008
    Posts
    38

    Changing dateType of a column

    i need to change the datType of a column:

    below the code i thought will work but it is not.

    alter table emp rename column insert_time to time_value1 date default (sysdate)

    ----------------------------------------------------------------

    i know the above query is wrong,can any one provide a good solution

  2. #2
    Join Date
    Aug 2007
    Location
    Cyberjaya,kuala lumpur
    Posts
    340
    check this will work or not....

    alter table tablename modify(coumn_name);

  3. #3
    Join Date
    Jun 2008
    Posts
    38
    thanks for ur help:

    alter table table_name modify column_name datatype

  4. #4
    Join Date
    Aug 2007
    Location
    Cyberjaya,kuala lumpur
    Posts
    340
    you can do it like this..

    SQL> create table insert_time(time varchar(20));

    Table created.

    SQL> alter table insert_time modify(time date);

    Table altered.

    SQL>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width