我要列出一个表中的最新10条数据中倒数7条,怎么写?
基本语句如下:select top 10 article_id,subject title,utime adddate,doc_type,title_color from newstitle where pub_status='1' and doc_type=2 order by utime desc
基本语句如下:select top 10 article_id,subject title,utime adddate,doc_type,title_color from newstitle where pub_status='1' and doc_type=2 order by utime desc
(select top 10 article_id,subject title,utime adddate,doc_type,title_color from newstitle where pub_status='1' and doc_type=2 order by utime desc) a order by a.utime
(select top 10 article_id,subject title,utime adddate,doc_type,title_color from newstitle where pub_status='1' and doc_type=2 order by utime desc) a
order by utime
原句是这样的,strsql="select * from(select source article_id,subject title,utime adddate,doc_type,title_color from newstitle where pub_status='1' and doc_type='外汇新闻' order by utime desc) where rownum<11"我现在要最新的倒数7条! 怎么办?
(
select top 10 * from newstitle
order by time
) order by 时间 desc
(select top 10 article_id,subject,utime,doc_type,title_color from newstitle where pub_status='1' and doc_type=2 order by utime desc) a order by a.utime