select top 10 * from (select top 40 * from a order by id asc
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/17 03:47:49
select top 10 * from (select top 40 * from a order by id asc) top_n order by id desc
以上这句是你写的,取出表A中第31到第40记录(SQLServer2005,以自动增长的ID作为主键,注意:ID可能不是连续的.)
我想问下能不能将这段代码给讲解下.select top 40是查询前40条数据吧.那么括号外的select top 10是查询40条数据里的前10条.那不是和题目的意思不同了嘛.但我放到数据库里是能查到的.请讲解下,
以上这句是你写的,取出表A中第31到第40记录(SQLServer2005,以自动增长的ID作为主键,注意:ID可能不是连续的.)
我想问下能不能将这段代码给讲解下.select top 40是查询前40条数据吧.那么括号外的select top 10是查询40条数据里的前10条.那不是和题目的意思不同了嘛.但我放到数据库里是能查到的.请讲解下,
这个语句第一部分
(select top 40 * from a order by id asc) top_n
查出前40条数据,表的别名为 top_n
再 order by id desc逆序查询出前10条,
也就是40到31条
所以就能取到结果
若还有疑问请直接HI我.
(select top 40 * from a order by id asc) top_n
查出前40条数据,表的别名为 top_n
再 order by id desc逆序查询出前10条,
也就是40到31条
所以就能取到结果
若还有疑问请直接HI我.
select top 10 * from (select top 40 * from a order by id asc
sql="select top 1 * from news order by tim desc" 中的top 1是什么作
sqltext4="select top 2 * from stock order by Look_Count desc
select * top 99 percent from 职工 order by case when 工资 is nul
sql语句中参数乘法select top 4 *from UserInfowhere ID not in(select
请问sql="select * from 招聘信息 order by id
select count(*) as total from 'test' order by id desc
select max(account_id ) from(select top 5 account_id from ac
sql = "Select * from product_series order by index desc,id a
英语翻译select top 4 * from shop_books where anclassid = (select
select top 1 ID from Net_dictionary,其中top1 ID指的是什么?
select id from (select id from pedigree group by number havi