关于Sql Server中的DateTime类型的比较的奇怪结果
在SQL Server2008中:
表Table_1的数据
tid ttime tvalue
3 2010-02-07 00:51:16.043 3
4 2010-02-07 00:51:21.910 4
用以下sql查询:
select * from Table_1 as t
where t.ttime>N'2010-02-07 00:51:16.042'
order by t.ttime
结果得到以下结果:
tid ttime tvalue
4 2010-02-07 00:51:21.910 4
不是应该得到tid为3的这条记录吗?
自己查到了
在sql server的帮助里有这么一句话:
精确度: 舍入到 .000、.003 或 .007 秒三个增量。
{{
相关问答:
执行的顺序:
1)文件浏览框(选择文件使用)
选择好文件后
点击一个导入按钮的时候 ,把上面上传框里的csv文件以一个ID为文件名,上传到**/**文件夹下
2)读取这个文件夹下的csv的文件,转换成sql
3 ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
今天做了一个存储过程 环境是SQL2000数据库
大致如下
建立临时表
定义员工游标
循环员工(属于1个公司)
......
protected void btnLogin_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("Server = (local);user id = sa;pwd = 1;database = Login");
&nb ......
我们C#做一个窗体 往数据库里插入数据
SqlConnection cn = new SqlConnection("Data Source=20090713-1752\\SQLEXPRESS;Initial Catalog=goods;Integrated Security=True");
......