最近遇到一個SQL Script的問題: 在View裏面寫上ORDER BY是否有效?
得到的結果是:
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.
意思是說:
在view, inline function, derived table, or subquery所使用的ORDER BY只對TOP clause做處理.
例:
Select top (10) percent aaa
From XXXX
Order by aaa
但是對Results而言, 並無Order的功能.
http://msdn2.microsoft.com/en-us/library/ms188385.aspx
http://msdn2.microsoft.com/en-us/library/ms188723.aspx
人客:『老闆! 我要這個、這個 還有那個, 通通幫我打包, 我要外帶.』
老闆:『不好意思...因為$#^%$#, 所以*&^%$*...』
人客:『啥?!沒有?!老闆....這樣不行喔.』
2007-12-12
2006-05-06
[程式語言] - Ruby / Ruby on Rails
近代在WEB化的波浪中, 新語言霸主的王位正競爭的火熱.
在眾多的參賽者當中, 以新人姿態, 迅速竄升的語言- Ruby.
直如其名, Ruby 所散出的光芒有寶石般閃亮. 多數人在試用過後,
都對它愛不釋手. 而 Ruby on Rails 的加持, 使 Ruby 原有的光芒更加耀眼.
Ruby
Ruby on Rails
在眾多的參賽者當中, 以新人姿態, 迅速竄升的語言- Ruby.
直如其名, Ruby 所散出的光芒有寶石般閃亮. 多數人在試用過後,
都對它愛不釋手. 而 Ruby on Rails 的加持, 使 Ruby 原有的光芒更加耀眼.
Ruby
Ruby on Rails
訂閱:
文章 (Atom)