- 关 键 词:
- 数据库
精华网络内容 :http://www.qqread.com/network/
大家知道1:如下查询语句没问题
select * from sysobjects order by name
2:如果把该查询语句建成视图
create view v_test
as
select * from sysobjects order by name
会提示出错:
The ORDER BY clause is invalid in views, inline functions, derived tables, and subqueries, unless TOP is also specified.
3: 既然提示除非在语句中使用top 才能用order by,那就好说了
create view v_test
as
select top 100 percent * from sysobjects order by name
一切正常
再用select * from v_test查一下,确实已经正确排序。
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
相关专题
- 基于pureXML技术的数据库表结构扩展 (4次浏览)
- 如何获得当前数据库对象依赖关系 (0次浏览)



