返回模式在指定表达式中第一次出现的起始位置;如果在所有有效的文本和字符数据类型中都找不到该模式,则返回零。

USE AdventureWorks2012;
GO
SELECT PATINDEX('%ensure%',DocumentSummary)
FROM Production.Document
WHERE DocumentNode = 0x7B40;
GO 

返回are 在 DocumentSummary字符串中的起始位置

下面是结果集:

-----------

64

 

(1 row(s) affected)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2022-02-01
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案