https://stackoverflow.com/questions/30045871/sorting-the-view-based-on-frequency-in-sql-server

Just like in sub queries, you can't use ORDER BY in a view definition in sql server unless you also use TOP.

The reason for this is that Views are acted upon as if they where tables, and tables in sql server (in fact, in any relational database) are considered as not ordered sets.
Just like there is no meaning to the order of records stored in a table,
there is also no meaning to the order of records fetched by a view.
You can use a dirty hack and write SELECT TOP 100 PERCENT ... and then use ORDER BY, but I doubt if it has any meaning at all.

Having said all that, you can of course use ORDER BY in any query that selects from a view.

 
select top 100 percent * from vie_trn_47 order by createdon desc

最新文章

  1. QQ揭秘:如何实现窗体靠边隐藏?【低调赠送:QQ高仿版GG 4.2 最新源码】
  2. lua的table表处理 及注意事项
  3. const,readonly 这些你真的懂吗? 也许会被面试到哦。。。
  4. 如何开启多用户同时远程连接(Windows2008 Windows2012)
  5. SRM 586 DIV1 L1
  6. Mongodb操作总结
  7. ENVI5.1批量镶嵌工具界面按钮显示不全的解决方案
  8. 详解python2 和 python3的区别
  9. Django项目实战之用户上传与访问
  10. 修改rpm中的文件重新打包
  11. 使用lombok 注解Java类
  12. vue+vuecli+webapck2实现多页面应用
  13. centos7 php-apache镜像添加redis/memcache/gd/mysql_pdo/mysqli/imagick
  14. springmvc+mybatis环境搭建
  15. day 7-15 表与表之间的关系
  16. JavaScript 函数定义和调用
  17. 《剑指offer》-孩子们的游戏(圆圈中最后剩下的数)
  18. inno setup 软件打包
  19. WPF Slider滑动条的颜色修改
  20. ASP.NET 网站管理工具介绍

热门文章

  1. 【DNN 系列】 模块开发 8.0.1
  2. #p-complete原来比np更难
  3. T_SQL 字符串函数
  4. Python常用目录操作(Python2)
  5. [NOI2010]海拔 平面图转对偶图 最小割
  6. NodeJS学习笔记 (29)二进制解码-string_decoder(ok)
  7. easyui-combobox实现取值范围的联动
  8. 使用let's encrypt为你的Ubuntu14+nginx网站保驾护航!
  9. Unity Shader (一)ShaderLab 语法
  10. Android后台进程与前台线程间的区别使用