-
Default sorting
Hi,
Is there any way i can change the default sorting method (Ascending or Descending) for a database.
-
http://download-west.oracle.com/docs...24.htm#1020138 to change linguistic sort, but there's no way to change default to "descending" that I'm aware of.
-
The problem here is
i have 2 databases and when i issue a statement like
SQL> select * from com_groupby; from DB1
GROUPBY_NAME
--------------------
Brand
Manufacturer
Sub Segment
Super Segment
SQL> select * from com_groupby; from DB2
GROUPBY_NAME
--------------------
Super Segment
Sub Segment
Manufacturer
Brand
The order seems to be different.I am not using any sort here.What could be the reason???.Is the way the data was stored or anything else???.
Pls. let me know.
-
Without an ORDER BY, the sorting order is irrelevent.
Jeff Hunter
-
Yes its amazing.I tried to insert a new record in that table and when i queried the table still it sorts.Let me know if anybody have any idea???.
-
Originally posted by marist89
Without an ORDER BY, the sorting order is irrelevent.
Jeff Hunter
-
select * from lpeduc.com_groupby;
GROUPBY_NAME
--------------------
Brand
Manufacturer
Sub Segment
Super Segment
insert into lpeduc.com_groupby values('Detroit');
1 row created.
SQL> select * from lpeduc.com_groupby;
GROUPBY_NAME
--------------------
Brand
Detroit
Manufacturer
Sub Segment
Super Segment
SQL> desc lpeduc.com_groupby
Name Null? Type
----------------------------------------- -------- ----------------------------
GROUPBY_NAME NOT NULL VARCHAR2(20)
This has a primary key index on GROUPBY_NAME.
Let me know if someone find something???.
-
Listen to what Jeff said ! ! ! !
Without an order by clause, the order of returned rows will be:
IRREPRODUCIBLE,
DIFFERENT TODAY AND TOMORROW,
RANDOM,
UNDEFINED,
MYSTERIOUS,
MAGIC
and a complete waste of time trying to investigate or predict.
-
maybe you should find out about the init.ora parameter:
_sorting_order=-1
Jeff Hunter
-
Originally posted by marist89
maybe you should find out about the init.ora parameter:
_sorting_order=-1
Or ...
_group_by_equals_sort=true
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|