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

用作分隔符的一个字符字符串。 它可以是单引号(')、左括号或右方括号([ ] )或双引号(“)。 如果未指定quote_character,则使用括号。

返回

添加了指定引号字符的原始字符串。

属性

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。 有关相应SQL Server函数的信息,请参阅 QUOTENAME (Transact-SQL)

适用于