按条款排序 [英] Order by Clause

查看:253
本文介绍了按条款排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在oracle中,可以在视图中使用Order by子句吗?
当我使用我没有得到排序的值.
我正在使用
从emp顺序按empname选择empno,empname;
如何在Oracle中使用.

谢谢大家.

Hi,

In oracle , can we use Order by clause in views?
when i use i didnot get sorted values.
I am using like
select empno,empname from emp order by empname;
how to use in Oracle.

Thanks All.

推荐答案

要查看,无法使用Order By(据我所知).可能是在查询视图本身时定义Order By子句;)
For a view it''s not possible to use Order By (as far as I know). What is possible is to define an Order By clause when querying the view itself ;)




在视图的定义中使用ORDER BY时,内联
函数,派生表或子查询,则使用该子句
仅确定TOP子句返回的行.
ORDER BY子句不保证有序结果
当查询这些构造时,除非ORDER BY为
也可以在查询本身中指定.

如果要查看特定视图中的内容
顺序,则在查询视图时必须指定ORDER BY.
Hi,

When ORDER BY is used in the definition of a view, inline
function, derived table, or subquery, the clause is used
only to determine the rows returned by the TOP clause.
The ORDER BY clause does not guarantee ordered results
when these constructs are queried, unless ORDER BY is
also specified in the query itself.

If you want to see the contents of the view in a particular
order, you must specify ORDER BY when you query the view.


这篇关于按条款排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆