4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

在steemsql(mssql)中搜索字符中含有中文

我想搜索一下本年发表的和中文诗有关的文章,于是我在linqpad中使用sql语句

select * from comments where created>='2018-01-01 00:00:00' and title like '%诗%'

结果是0记录,居然没有找到,这怎么回事?于是我百度谷歌,然后我换用了以下SQL语句:

select * from comments where created>='2018-01-01 00:00:00' and title like N'%诗%'

等一会儿以后,显示出162条记录。

原来要在前面加一个字符N,才能检索到中文!

5 upvotes $0.07

Replies (0)

Conversation

No replies yet

Replies will appear here as people join the conversation.

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: