SQLSERVER XML 类型列的模糊查询

select
  <column_name>
from
  MyTable
where
  <column_name>.value('(/root/sub-tag)[1]', 'varchar(max)') like 'StringToSearchFor'

or


 

These pages will show you more about how to query XML in T-SQL:

Querying XML fields using t-sql

Flattening XML Data in SQL Server

 

 

 

找了半天才找到!!不容易!

posted @ 2017-10-12 15:26  西番莲果汁  阅读(1906)  评论(0编辑  收藏  举报