Data in the table have Peking union medical college hospital records, but by name retrieval is no results, the content of the stored in the database is no problem, wait for you action
CodePudding user response:
This there are many possible, such as a database field type is char (n), or a computer to use different character sets and database may beIf is SQL Server database can be according to the following steps to check:
1. Add a record, change the unitname to simple English letter such as: a
Then select * from unit_info where unitname='a' and see if I can get the results
If no results can be judged as basic database field for char (n)/nchar (n)
Modified method: select * from unit_info where unitname=rtrim (' a ')
2. The above method can find, but Chinese is not very trouble may be related to the machine and the server Settings
Can try to change the server field type to nvarchar (n), use the statement select * from unit_info where unitname=n 'Peking union medical college hospital; To have a try
CodePudding user response: