Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

CHARACTER_SET_NAME of INFORMATION_SCHEMA.COLUMNS is NULL when UTF-8 is used

I am checking with SQL Server 2019 CTP 2.2.
Create a table with the following query:
===
DROP TABLE IF EXISTS T1
DROP TABLE IF EXISTS T2

CREATE TABLE T1 (
C1 int,
C2 varchar (20),
C3 nvarchar (20),
C4 varchar (20) COLLATE Japanese_XJIS_140_CI_AS_UTF 8
INDEX CIX_T1 CLUSTERED (C1)
)
====
After creating the table, check the information with the following query.

====
select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, CHARACTER_SET_NAME,COLLATION_NAME
from INFORMATION_SCHEMA.COLUMNS
====

The following information is output.
====
DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
varchar cp932 Japanese_CI_AS
nvarchar UNICODE Japanese_CI_AS
varchar NULL Japanese_XJIS_140_CI_AS_UTF8
====

When UTF-8 is used, CHARACTER is NULL, but is not it better to display like UTF-8?

2 votes
Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)

We’ll send you updates on this idea

Masayuki Ozawa shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base