要查看SQL Server中的字符集,可以執行以下步驟:
SELECT
t.name AS table_name,
c.name AS column_name,
c.collation_name
FROM
sys.tables AS t
JOIN
sys.columns AS c ON t.object_id = c.object_id;
SELECT
column_name,
collation_name
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
table_name = 'your_table_name';
這些查詢將顯示每個表中每個列的字符集。字符集定義了列中數據的排序順序、大小寫敏感性以及其他特性。