mssql 查询后,无条件降序排列
就是把查询结果,不指定列,按照降序显示
SELECT * FROM TABLE1 ORDER BY DESC
------解决方案--------------------SELECT * FROM TABLE1
如果没有order by ,则默认会按主键升序排列
楼主要按降序排列必须指定字段了
------解决方案--------------------select px=IDENTITY(int),* into # from TABLE1
select * from # order by px desc
drop table #
------解决方案--------------------SELECT
ROWID = ROW_NUMBER() OVER(ORDER BY GETDATE()),
*
FROM dbo.spt_values
ORDER BY ROWID DESC
------解决方案--------------------这个跟你的聚集索引创建方法有关系