Golang Tutorials - Learn Go Programming with Easy Step-by-Step Guides

Explore comprehensive Golang tutorials for beginners and advanced programmers. Learn Go programming with easy-to-follow, step-by-step guides, examples, and practical tips to master Go language quickly.

Nchar Function In Sql in SQL

Nchar Function In Sql in SQL

? NCHAR Function in SQL

The NCHAR() function returns the Unicode character for a given integer code point. It is used to convert an integer ASCII/Unicode code into its corresponding Unicode character.


? Syntax:

NCHAR(integer_expression)
  • integer_expression: The Unicode code point (an integer) you want to convert.


? Example:

SELECT NCHAR(65) AS character;

Result:

character
A

Because 65 is the Unicode (and ASCII) code for uppercase 'A'.


? Notes:

  • Useful when you want to convert Unicode code points to characters.

  • Supported in:

    • SQL Server

    • Oracle (also supports NCHAR)

  • In MySQL, similar functionality is available with CHAR() function with charset.


Related functions:

  • UNICODE() — returns the Unicode code point of a character.

  • CHAR() — returns the character for an ASCII code (non-Unicode in some DBs).


Want an example with multiple characters or usage in a query?

Disclaimer for AI-Generated Content:
The content provided in these tutorials is generated using artificial intelligence and is intended for educational purposes only.
html
docker
php
kubernetes
golang
mysql
postgresql
mariaDB
sql