不行,SQL没有提供只有日期的类型也没有只有时间的类型,只有日期加时间的类型:datetime

解决方案 »

  1.   

    可以都设为字符类型
    try:select convert(varchar(10),getdate(),120)select convert(varchar(8),getdate(),108)
      

  2.   

    没有这样的类型,但可以转换
    查:sql online help: convert
      

  3.   

    你可以先存在一个字段中,然后,通过改表将其分为两个字段
    测试如下:
    --声明表变量:
    declare @a table (日期 datatime,时间 datetime)
    --建触发器
    create trigger ins_time on @a for insert, update
    as
    declare @ins_time datetime 
    select @ins_time =日期
    update @a 
    set 日期=left(@ins_time ,10)
    update @a
    set 时间=right(@ins_time,9))  --针对你的时间格式  有所改动
    go
      

  4.   

    各位我还有一个很类似的问题,能不能帮看一下
    http://expert.csdn.net/Expert/topic/2098/2098849.xml?temp=.2348596