Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

When using plsql, the query Oracle statement cannot match in Chinese.

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, when I was using plsql to query data, I queried a sql statement. After execution, I thought that the sql statement had been written wrong, because I would have known that the table to be checked could not be without data, so I went to the server to check it with sqlplus. The syntax is normal, and I don't know why. Later, I found that the client character set of Oracle in plsql is different from that on the server. The resulting Chinese language does not match. Check the character set used by Oracle on the server first.

SQL > select * from v$nls_parameters where parameter like 'NLS_CH%' PARAMETER----VALUE -NLS_CHARACTERSETAL32UTF8

Obviously, the character set used on the server is AL32UTF8, and your personal computer uses the Windows system, so the default character set of the DOS system is different from the default character set of the Unix system, so you can only change the environment variable of Oracle in the computer, and it is best to match the character language of the server, which is also a variable that begins with NLS, so I won't go into too much detail here. The modification is also very easy to open the environment variables under the advanced system configuration in the properties of my computer.

In this way, it is normal to reopen the plsql query containing Chinese sql statements after the variable assignment is saved.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report