Re: Order BY Cluase on View
Posted in 2003
--- rkusenet <rkusenet@sympatico.ca> wrote: > > "Asheesh Rastogi" <asheesh_iiug@yahoo.com> wrote > > > Can we really do that!!! I am not up to date on > 9.40 > > features, but I do remember a big discussion we > had > > here a few days back and the consensus was it is > npt > > supported on Informix and did not make and sense > to > > have a order by in CREATE VIEW, suppose you create > a > > view with order by clause on one column, and then > you > > fire another query with order by on another > column, > > what happens then? How would the user know that > the > > table has been created with an order by inside. > > Oracle does it and I believe what it does is that it > first > orders it based on the VIEW definiton and then > further orders > it based on SQL given. So the end result will be the > order > given in the SQL, even though it is inefficient to > do it twice. My question is if a user who is not supposed to know all these details runs a query on this view and uses and order by clause on say Column2 in it what would happen. As I understand the result set would be equivalent of saying order by Column1,Column2 but I guess this output would be really confusing for the user and he may end up insane. > > I really do not understand what value add would > this > > feature provide. > > Don't say that. Sometime back I posted this here > bcos we wanted > that in our system so as not to change the > application code. IMHO to avoid a change in application code is not a big enough value add to have this feature which only adds to confusion. > BTW SQL Server also does not support ORDER BY in > view definition. no comments on SQL server. __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com sending to informix-list