SqlFunctions.QuoteName 方法

定义

返回一个 Unicode 字符串,其中添加有分隔符,以使输入字符串成为有效的 Microsoft SQL Server 分隔标识符。Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier.

重载

QuoteName(String)

返回一个 Unicode 字符串,其中添加有分隔符,以使输入字符串成为有效的 Microsoft SQL Server 分隔标识符。Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier.

QuoteName(String, String)

返回一个 Unicode 字符串,其中添加有分隔符,以使输入字符串成为有效的 Microsoft SQL Server 分隔标识符。Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier.

注解

不能直接调用此函数。You cannot call this function directly. 此函数只能出现在 LINQ to Entities 查询中。This function can only appear within a LINQ to Entities query.

此函数已转换为数据库中的相应函数。This function is translated to a corresponding function in the database. 有关相应 SQL Server 函数的信息,请参阅 QUOTENAME (transact-sql) For information about the corresponding SQL Server function, see QUOTENAME (Transact-SQL).

QuoteName(String)

返回一个 Unicode 字符串,其中添加有分隔符,以使输入字符串成为有效的 Microsoft SQL Server 分隔标识符。Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier.

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

要将引号字符添加到其中的表达式。The expression that quote characters will be added to.

返回

String

添加有方括号的原始字符串。The original string with brackets added.

属性

注解

不能直接调用此函数。You cannot call this function directly. 此函数只能出现在 LINQ to Entities 查询中。This function can only appear within a LINQ to Entities query.

此函数已转换为数据库中的相应函数。This function is translated to a corresponding function in the database. 有关相应 SQL Server 函数的信息,请参阅 QUOTENAME (transact-sql) For information about the corresponding SQL Server function, see QUOTENAME (Transact-SQL).

适用于

QuoteName(String, String)

返回一个 Unicode 字符串,其中添加有分隔符,以使输入字符串成为有效的 Microsoft SQL Server 分隔标识符。Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier.

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

要将引号字符添加到其中的表达式。The expression that quote characters will be added to.

quoteCharacter
String

将用作分隔符的单字符字符串。The one-character string to use as the delimiter. 它可以是单引号 (')、左方括号或右方括号 ([ ]) 或者英文双引号 (")。It can be a single quotation mark ( ' ), a left or right bracket ( [ ] ), or a double quotation mark ( " ). 如果未指定 quote_character,则使用方括号。If quote_character is not specified, brackets are used.

返回

String

添加有指定引号字符的原始字符串。The original string with the specified quote characters added.

属性

注解

不能直接调用此函数。You cannot call this function directly. 此函数只能出现在 LINQ to Entities 查询中。This function can only appear within a LINQ to Entities query.

此函数已转换为数据库中的相应函数。This function is translated to a corresponding function in the database. 有关相应 SQL Server 函数的信息,请参阅 QUOTENAME (transact-sql) For information about the corresponding SQL Server function, see QUOTENAME (Transact-SQL).

适用于