What are NLS Strings in Oracle SQL which is shown as a difference between char and nchar as well as varchar2 and nvarchar2 data types ? Thank you
Every Oracle database instance has 2 available character set configurations:
Because the default character set could be configured to be a character set that doesn't support the full range of Unicode characters (such as Windows 1252), that's why Oracle provides this alternate character set configuration as well, that is guaranteed to support Unicode.
So let's say your database uses Windows-1252 for its default character set (not that I'm recommending it), and UTF-8 for the national (or alternate) character set...
Then if you have a table column where you don't need to support all kinds of weird unicode characters, then you can use a type such as varchar2 if you want to. And by doing so, you may be saving some space.
But if you do have a specific need to store and support unicode characters, then for that very specific instance, your column should be defined as nvarchar2, or some other type that uses the national character set.
That said, if your database's default character set is already a character set that supports Unicode, then using the nchar, nvarchar2, etc. types is not really necessary.
You can find more complete information on the topic here.
AFAIK, NLS
stands for National Language Support
which supports local languages (In other words supporting Localization). From Oracle Documentation
National Language Support (NLS) is a technology enabling Oracle applications to interact with users in their native language, using their conventions for displaying data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With