SqlServerDbFunctionsExtensions.PatIndex(DbFunctions, String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳指定表達式中模式首次出現的起始位置,若找不到該模式則為零,適用於所有有效的文字與字元資料型別。
public static long PatIndex(this Microsoft.EntityFrameworkCore.DbFunctions _, string pattern, string expression);
static member PatIndex : Microsoft.EntityFrameworkCore.DbFunctions * string * string -> int64
<Extension()>
Public Function PatIndex (_ As DbFunctions, pattern As String, expression As String) As Long
參數
DbFunctions 執行個體。
- pattern
- String
一個可以搜尋的串聯模式。
- expression
- String
通常是一欄,搜尋指定的模式
傳回
回傳特定表達式中模式首次出現的起始位置。
備註
更多資訊與範例請參閱「資料庫函數」及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。