SQL语句 - MS-SQL Server / 基础类
查询最新10条数据,时间按升序排列,若不够10条,显示存在的数据
SQL code:
select top 10 * from [Table] order by 时间 desc
我想按时间升序排列
select top 10 * from [Table] order by 时间
3楼理解错误
我的意思查询出最后10条数据后,然后再按时间让它显示
围观!
没看懂什么意思
SQL code:
select * from (select top 10 * from [Table] order by 时间 desc) aa order by 时间
7楼看懂了
6楼,咱们的名字一样啊下面
学习一下。。。
select * from (select top 10 * from [Table] order by 时间 desc) aa order by 时间
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
今天做了一个存储过程 环境是SQL2000数据库
大致如下
建立临时表
定义员工游标
循环员工(属于1个公司)
......
1。怎样使xp_cmdshell能完整输出超过255个字符的字符串。
2。select 时,检索速度是与from后的 TABLE顺序有关,还是与where条件的顺序有关(TABLE数据多少 )
在系统属性设定里有个选项,可以修改单字段输出字数限制. ......
我想查询出每天数据的最大的一个值。表的格式如下
表名: hisdata
字段 编号 值 状态 时间
Id value state dattime
101 32.3 0 ......
请教高手:
以下是数据库中的三条记录,英文为字段名称
id planname TaskBeginTime Status
329 2010年03 ......