摘要:
select top 8 * from tablett order by state desc select top 8 with ties * from tablett order by state desc 区别就是用了with ties 最后一行的参数值(在这句里是state相同 ) 如果相同 阅读全文
摘要:
--从people1中取出第n到第m条的数据select top m-n+1 * from people1 where (ID not in(select top n-1 id from people1)) --不在前4条的id(id是5+)中的前四条 例如:--从people1中取出第五到第八条的 阅读全文
摘要:
一、常用格式 select * from 表名 where group by (不能在group by 后面使用类型为text,ntext,image的列)(select子句必须包含在聚合函数或group by 子句中) havingorder by 二、 部分关键字 where 查询 逻辑运算符 阅读全文