求sql min为什么bug - .NET技术 / ASP.NET
[code=SQL]
select top (5*1) Id from table where SourceId=22292
[/code]
id
108
107
106
95
93
然后
[code=SQL]
select min(tt.id) from
(select top (5*1) Id from table where SourceId=22292) tt
[/code]
id
6
请问这是为什么
我的id的索引时desc的
我这样写在另外的一个表可以,是不是我这张表有什么问题
另外我不top的时候他的最小值是6,我觉得他min的时候没有算top,可是怎么想不对
SQL code:
select Id from table where SourceId=22292
108
107
106
95
93
56
6
SQL code:
select min(tt.id) from
(select top (5*1) Id from table where SourceId=22292 order by id desc) tt
这样是对的,我一order by 就对了,可是我只是想知道为什么,我的所以写的好好的
还有另外一张差不多一样的表到可以,就这个不行
SQL code:
select Id from table where SourceId=22292
这句返回的结果不止5条吧?
{{----
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
字段1,字段2.....字段N,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
想要的结果是:
1,Na ......
我用.net开发wap网站
1,我从工具箱里拖了两个link,这两个link会显示在两行,如果让这两个link处于同一行。
2,如何显示两个控件之间的空格问题。
跟wap有关吗?不太明白
友情帮顶。。。。。。。。。。
就 ......
各位大侠,我学习的是ASP.NET,想知道相关技术有哪些,就像JAVA EE中有struct sping jsp severlet 等,ASP.NET还有哪些些相关技术。
http://topic.csdn.net/u/20090914/21/af27de99-f0f3-4cfd-9379-13764f8ec6b1.ht ......