We're developing project with Spring Boot (JPA-Spring-Data) and Oracle Db. When trying to sort column which includes text, oracle gives me wrong sorting for Turkish Chars. Liquibase is our db migration tool.
This is a script for creation of table's column;
<column name="CONTENT" type="VARCHAR2(255 char)">
<constraints nullable="false"/>
</column>
Entitys property;
@Column(name = "CONTENT", nullable = false)
private String content;
When trying to order by Content; The result looks like below
But for example; İngilizceeee row would be after 'I' letter. There is an issue for Turkish text.
1条答案
按热度按时间yeotifhr1#
默认情况下,Oracle使用二进制排序。这是通过对字符编码后的数值进行排序来实现的。这适用于英语字母表,因为ASCII和EBCDIC标准定义了字母A到Z的升序数值。请尝试使用'语言排序'。请参阅此处-
https://docs.oracle.com/cd/B10501_01/server.920/a96529/ch4.htm
示例-