共用方式為


SqlFunctions.QuoteName 方法

定義

多載

QuoteName(String)

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

QuoteName(String, String)

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

QuoteName(String)

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

[System.Data.Entity.DbFunction("SqlServer", "QUOTENAME")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="stringArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId="string")]
public static string QuoteName(string stringArg);
static member QuoteName : string -> string
Public Shared Function QuoteName (stringArg As String) As String

參數

stringArg
String

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

傳回

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

屬性

適用於

QuoteName(String, String)

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

[System.Data.Entity.DbFunction("SqlServer", "QUOTENAME")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="quoteCharacter")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId="string")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="stringArg")]
public static string QuoteName(string stringArg, string quoteCharacter);
static member QuoteName : string * string -> string
Public Shared Function QuoteName (stringArg As String, quoteCharacter As String) As String

參數

stringArg
String

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

quoteCharacter
String

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

傳回

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

屬性

適用於