mssql 查询后,无条件降序排列
就是把查询结果,不指定列,按照降序显示
SELECT * FROM TABLE1 ORDER BY DESC 无条件 降序?排列?mssql
[解决办法]
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