共用方式為


SqlFunctions.QuoteName 方法

定義

傳回已加入分隔符號的 Unicode 字串,讓輸入字串成為有效的 Microsoft SQL Server 分隔識別碼。

多載

QuoteName(String)

傳回已加入分隔符號的 Unicode 字串,讓輸入字串成為有效的 Microsoft SQL Server 分隔識別碼。

QuoteName(String, String)

傳回已加入分隔符號的 Unicode 字串,讓輸入字串成為有效的 Microsoft SQL Server 分隔識別碼。

備註

您無法直接呼叫此函式。 此函式只能出現在 LINQ to Entities 查詢內。

此函式會轉譯為資料庫中的對應函式。 如需對應 SQL Server 函式的相關信息,請參閱 QUOTENAME (Transact-SQL)

QuoteName(String)

傳回已加入分隔符號的 Unicode 字串,讓輸入字串成為有效的 Microsoft SQL Server 分隔識別碼。

public:
 static System::String ^ QuoteName(System::String ^ stringArg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "QUOTENAME")]
public static string QuoteName(string stringArg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "QUOTENAME")>]
static member QuoteName : string -> string
Public Shared Function QuoteName (stringArg As String) As String

參數

stringArg
String

要加入引號字元的運算式。

傳回

已加入方括號的原始字串。

屬性

備註

您無法直接呼叫此函式。 此函式只能出現在 LINQ to Entities 查詢內。

此函式會轉譯為資料庫中的對應函式。 如需對應 SQL Server 函式的相關信息,請參閱 QUOTENAME (Transact-SQL)

適用於

QuoteName(String, String)

傳回已加入分隔符號的 Unicode 字串,讓輸入字串成為有效的 Microsoft SQL Server 分隔識別碼。

public:
 static System::String ^ QuoteName(System::String ^ stringArg, System::String ^ quoteCharacter);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "QUOTENAME")]
public static string QuoteName(string stringArg, string quoteCharacter);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "QUOTENAME")>]
static member QuoteName : string * string -> string
Public Shared Function QuoteName (stringArg As String, quoteCharacter As String) As String

參數

stringArg
String

要加入引號字元的運算式。

quoteCharacter
String

用來做為分隔符號的單字元字串。 它可以是單引號 ( ' )、左或右方括號 ( [ ] ),或雙引號 ( " )。 如果沒有指定引號字元,就會使用方括號。

傳回

已加入指定引號字元的原始字串。

屬性

備註

您無法直接呼叫此函式。 此函式只能出現在 LINQ to Entities 查詢內。

此函式會轉譯為資料庫中的對應函式。 如需對應 SQL Server 函式的相關信息,請參閱 QUOTENAME (Transact-SQL)

適用於