T-SQL - changing datetime to date data type?

前端 未结 1 895
深忆病人
深忆病人 2021-02-19 03:44

I have a column BirthDate in a table that is using the datetime data type. Currently, the values resemble the format 1987-12-30 00:00:00.000

相关标签:
1条回答
  • 2021-02-19 04:31

    You will need to ALTER the table:

    ALTER TABLE CUSTOMERLIST ALTER COLUMN BirthDate date not null
    

    See Sql Fiddle with demo

    0 讨论(0)
提交回复
热议问题