select * from news where shijian like '2001-2-2125' select * from news where shijian = '2001-2-21' 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 为什么不这样用?select * from news where shijian>='2001-2-20' and shijian<='2002-2-22'select * from news where shijian between '2001-2-20' and '2002-2-22' shijian 是datetime类型?select * from news where convert(varchar(20),shijian,120)='2001-02-21 09:21' select * from news where convert(varchar(20),shijian,120) like '2001-02-21 09:21%' 那就shijian > '2001-2-20 0:00' 取出今天提交的数据,也就是00:00---24:00select * from news where convert(varchar(10),shijian,120)='2001-02-21' 也可以select * from news where datediff(day,'2001-02-21',shijian)=0 where shijian>='2001-02-01' and shijian<'2001-02-02'orwhere shijian>='2001-02-01' and shijian<='2001-02-01 23:59:59.999' 我在还原数据库的时候,出现如下的错误: 请教MS-SQL语法 在SQL中怎样将数据写入到TXT文本文件中? DateTime问题 有谁能告诉我如何能执行下面那条存储过程吗 谈谈数据导入的问题~~~~~~~~~~~ 附加数据库 按钮灰色 如何为多表添加字段 急啊!!!急!有关SQL分组查询。。我想了很久也很痛苦! Error 21776,什么错误? 捕捉存储过程的异常信息? 新手问题:在SQL SERVER中插入字符串碰到的问题
select * from news where shijian>='2001-2-20' and shijian<='2002-2-22'select * from news where shijian between '2001-2-20' and '2002-2-22'
select * from news where convert(varchar(20),shijian,120)='2001-02-21 09:21'
select * from news where convert(varchar(10),shijian,120)='2001-02-21'
select * from news where datediff(day,'2001-02-21',shijian)=0
or
where shijian>='2001-02-01' and shijian<='2001-02-01 23:59:59.999'