sql语句 查询某数据前后十条 怎么写

要求是cid相同,查找did=某值这条数据前后十条数据

第1个回答  2014-01-27
用Top 关键字
Select Top 10 * From 表 Where did=某值
就可以获得10条数据本回答被网友采纳
第2个回答  2014-01-27
是查2个表吧
select top 10 * from A(表) inner jion B(表) on A.cid=B.cid where did='某值'
第3个回答  2014-01-27
select top 10 *
from
where did=
order by cid

select top 10 *
from
where did=
order by cid desc
第4个回答  2014-01-27
oracle数据库的?
相似回答