我有SMSS Microsoft SQL Server Management Studio 17.3 Select @@VERSION
显示Microsoft SQL Server 2014 - 12.0.2269.0 (X64)
以下是查询,如图所示,希伯来字符未显示在表格中。
DROP TABLE ABCD
CREATE TABLE ABCD(AAA INT, BBB VARCHAR(100))
INSERT INTO ABCD(AAA,BBB) VALUES(1,'אאא')
select * from ABCD
select * from ABCD where BBB LIKE '%א%'
答案 0 :(得分:4)
NVARCHAR正是您所寻找的
我应该添加 N 表示unicode字符串 as explained here
DROP TABLE ABCD
CREATE TABLE ABCD(AAA INT, BBB NVARCHAR(100))
INSERT INTO ABCD(AAA,BBB) VALUES(1,N'אאא')
select * from ABCD
select * from ABCD where BBB LIKE N'%א%'
返回
AAA BBB
1 אאא
AAA BBB
1 אאא