ALTER TABLE char to datetime

  • Hello all,

    Who can help me with my proble,

    i want to change my column data type of char(10) into datetime null value

    everyone can give me a script to change into char to datetime please

    thanks

  • ALTER TABLE <Table name>

    ALTER COLUMN <Column name> DATETIME NULL

    Make sure all the data in that column can be converted to date time, or you'll get some interesting error messges

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply