Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Collating Sequence

499236Jan 10 2008 — edited Jan 10 2008
What is a collating sequence?
DECLARE
last_name1 VARCHAR2(10) := 'COLES';
last_name2 VARCHAR2(10) := 'COLEMAN';
BEGIN
IF last_name1 > last_name2 THEN
DBMS_OUTPUT.PUT_LINE ( last_name1 || ' is greater than ' || last_name2 );
ELSE
DBMS_OUTPUT.PUT_LINE ( last_name2 || ' is greater than ' || last_name1 );
END IF;
END;

output: COLES is greater than COLEMAN
I found this example in this link
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/datatypes.htm#sthref869

1.Can we check how values are compared based on the collating sequence during the above block execution?

2.Is there any sql command to check the collating sequence values of characters in a string.

Please let me know in case of disconnects.

Thanks in advance

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 7 2008
Added on Jan 10 2008
5 comments
744 views