Sorting results on Oracle as ASCII Sorting results on Oracle as ASCII oracle oracle

Sorting results on Oracle as ASCII


For that case, you should be able to just order by the BINARY value of your characters;

SELECT id, my_varchar2 FROM my_table ORDER BY NLSSORT(MY_VARCHAR2, 'NLS_SORT = BINARY')

SQLFiddle here.