質問

I have bulk-data in SQL-Server table. One of the fields contains following data :

'(اے انسان!) کیا تو نہیں جانتا)' 

Tried:

SELECT * from Ayyat where Data like '%انسان%' ;

but it is showing no-result.

役に立ちましたか?

解決

Plese use N before string if language is not a english:

  SELECT * from Ayyat where Data like N'%انسان%' ;

他のヒント

If you're storing urdu, arabic or other language except english in your database first you should convert your database into another format and then also table.

first you've to convert your database charset and also collation alter your database

ALTER DATABASE database_name CHARACTER SET utf8 COLLATE utf8_general_ci

then convert your table

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci

after this execute normal your query

SELECT * FROM table_name WHERE Datas LIKE '%انسان%'

Note: if you not convert your database and table other languages and special characters will be changed into question marks.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top